We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 2.6.2
Code
class ValueWrapper<T> { constructor(private readonly value: T) {} public getValue(): T { return this.value; } public isZero(this: ValueWrapper<number>): boolean { return this.value === 0; } } const stringWrapper = new ValueWrapper<string>("hello"); const numberWrapper = new ValueWrapper<number>(42);
Expected behavior:
Intellisense should only suggest the isZero method on numberWrapper, but not for stringWrapper.
isZero
numberWrapper
stringWrapper
Actual behavior:
Intellisense does not filter out suggestions based on this param types. (screenshot from the Typescript Playground)
this
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TypeScript Version: 2.6.2
Code
Expected behavior:
Intellisense should only suggest the
isZero
method onnumberWrapper
, but not forstringWrapper
.Actual behavior:
Intellisense does not filter out suggestions based on
this
param types.(screenshot from the Typescript Playground)
The text was updated successfully, but these errors were encountered: