I recently upgraded to TypeScript 0.9.5, which now causes new errors at compile time.
I am defining an AMD module using RequireJS as described HERE .
define('myModule', [
'angular',
'config'
], function (angular, config) {
'use strict';
...
});
The TypeScript definition file for RequireJS has the following definition for RequireDefine:
(name: string, deps: string[], ready: (...deps: any[]) => any): void;
However, I get the following errors:
error TS2082: Build: Supplied parameters do not match any signature of call target:
error TS2087: Build: Could not select overload for 'call' expression.
Intellisense error:
Calling signatures of types '(angular: any, config: any) => any' and '(... deps: any []) => any' are incompatible.
Is the definition file incorrect? Where am I mistaken with callback parameters?
Additional Information:
Now the following declaration is compiled:
define('myModule', [
'angular',
'config'
], function (...args:any[]) {
'use strict';
...
});
However, the transition to a single parameter object is, of course, a step backward? Is this a limitation of a TypeScript definition file or compiler?