I was just trying to compile the latest version of the jquery declaration file from definitelyTyped, here.
The problem I have here, right now is this:
C:/nodejs/tsc.cmd --sourcemap jquery.d.ts --module commonjs --target ES5
C:/gamesbrainiac/d.ts/DefinitelyTyped/jquery/jquery.d.ts(491,40): error TS2173: Generic type references must include all type arguments.
node
running @ version 0.10.3
and Typescript
@ version 0.9.1.1
.
What does this error mean, I'd like to understand the error messages so that I can solve the problems myself, instead of asking others to do it for me.
That line should have been:
promise(type?: any, target?: any): JQueryPromise<any>;
I'll send them a pull request. Thanks.
JQueryPromise is a generic interface. i.e. it takes type parameters. Starting with TS 0.9.1.1 they are more strict about generic parameters. They must be specified from now on. This was allowed in previous versions (where the type was assumed to any implicitly) but the compiler analysis is stricter now (and the type must be specified explicitly).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With