cmichaelgraham / aurelia-typescript

A starter kit for working with the Aurelia TypeScript type definitions
MIT License
144 stars 52 forks source link

IPromise#then signature fix #13

Closed KirillGrishin closed 9 years ago

KirillGrishin commented 9 years ago

Hi.

I think the signature for this https://github.com/cmichaelgraham/aurelia-typescript/blob/master/skel-nav-esri-vs-ts/skel-nav-esri-vs-ts/typings/aurelia/aurelia.d.ts#L184 method should be something like the following.

interface IPromise<T> {
    then<U>(callback: (response: T) => U): IPromise<U>;
}

I have converted tests to TypeScript / Gulp and I used your aurelia.d.ts. With the current implementation the compiler would give the error.

src/test/unit/flickr.spec.ts(26,20): 2339 Property 'then' does not exist on type 'void'

Unfortunately I do not have Visual Studio, so I cannot check it against your repository. That's why I am raising this as an issue rather than a pull request.

Cheers.

cmichaelgraham commented 9 years ago

Thanks @KirillGrishin !! :) I'll put that in and run it through its paces. I really appreciate the input :)

By the way, compatibility with native ES6 code should get a whole lot better with TypeScript 1.5

cmichaelgraham commented 9 years ago

aurelia.d.ts updated with proposed change. smoke tests completed on each sample.

thanks again @KirillGrishin !!