TypeScript issues in 9.1.X

In both 9.1.1 and 9.1.2 there issues with TS at least in VS 2015 _only_.

This issue is only observed when R# is enabled. After I suspend it, the issue disappers. After enabling R#, the issue appears again. There is no issue observed on the same machine when running VS 2013.

The problem is that R# constantly reports that TypeScript class does not implement specified interface when it actually does. It does not happen with any interface but at least in some of those with generics. Here is the example:

https://www.dropbox.com/s/yqqj835phawn5k7/Screenshot%202015-07-26%2022.42.57.png

11 comments
Comment actions Permalink

Thanks a lot for reporting, Alexey. Could you please provide code of "ng.IPromise" interface from your example, if possible?

0
Comment actions Permalink

ng.IPromise is the type definition from angular definitelytyped file https://github.com/borisyankov/DefinitelyTyped/blob/master/angularjs/angular.d.ts

0
Comment actions Permalink

Thanks. I installed this .d.ts file and tried with code similar to your example. Seems that this issue is already fixed in 9.2.

You're welcome to try 9.2 EAP builds and say whether it was fixed: https://confluence.jetbrains.com/display/ReSharper/ReSharper+9.2+EAP. Thanks!

0
Comment actions Permalink

I will try and report if it works, thanks

Does 9.2 also support TS 1.5? I tried using "namespace" instead of "module" and it does not work in 9.1.3

0
Comment actions Permalink

Yes, 9.2 fully supports 1.5, and even supports some features of 1.6.

0
Comment actions Permalink

I installed 9.2 EA6 and it is exactly the same. I cannot see that this has been any improvment.
30-07-2015 23-47-39.png

0
Comment actions Permalink

Hi, Alexey. Thanks a lot for trying 9.2.

Unfortunately, I cannot reproduce the issue only using the piece of code you provided on your screenshot. The following works fine:

export interface IBookingCreation {
    a;
}

export interface IBookingResponse {
    b;
}

export interface IBookingDetails {
    c;
}

export interface IBookingService {
    createBooking(booking: IBookingCreation,
        errorCallback?: (response: ng.IHttpPromiseCallbackArg<any>) => any)
        : ng.IPromise<IBookingResponse>;
    getBooking(bookingId: string, token: string): ng.IPromise<IBookingDetails>;
}

class BookingService implements IBookingService {
    constructor(private $http: ng.IHttpService) {  }

    createBooking(booking: IBookingCreation,
        errorCallback?: (response: ng.IHttpPromiseCallbackArg<any>) => any): ng.IPromise<IBookingResponse> {
        return null;
    }

    getBooking(bookingId: string, token: string): ng.IPromise<IBookingDetails> {
        return null;
    }
}


Could you please provide more of your code so that your issue can be reproduced on that piece of code, or could you share your solution? We can sign an NDA if needed.
Thanks.

0
Comment actions Permalink

I will try to make a samle project and place it on Github. This thing happens in all my service classes.

0
Comment actions Permalink

Thanks a lot! Will look at this issue asap, when you'll share the repro.

0
Comment actions Permalink

I failed with reproducing this issue in a separate repository, it works just fine.

What I found then is that my project file got corrupted and all type definition files were mentioned there twice. I guess R# sees this as two different, incompatible definitions. When I did some cleanup, the issue was gone.

0
Comment actions Permalink

Thanks a lot, good that it got fixed after a clean-up.
ReSharper issue with same definition files referenced multiple times is known, we'll change our caches model in the next version to avoid such side effects.

0

Please sign in to leave a comment.