Uh oh!
There was an error while loading. Please reload this page.
Allow to find all references of the 'this 'keyword - #9270
Conversation
| return undefined; | ||
| } | ||
| //neater |
aca2d6c to
f1f82e1Compare| parameters: Symbol[]; // Parameters | ||
| thisType?: Type; // type of this-type | ||
| /* @internal */ | ||
| thisParameter?: Symbol; // symbol of this-type parameter |
There was a problem hiding this comment.
It was never quite right to resolve thisType in getSignatureOfDeclaration so switching to a symbol is an improvement. But it means that you should remove thisType entirely and replace usages with getTypeOfSymbol(sig.thisParameter).
Looks good except for getting rid of |
Yui (@yuit) and I discussed the removal of if(declaration.kind===SyntaxKind.Identifier&&declaration.originalKeyword.kind===SytaxKind.ThisKeyword){returnlinks.type=declaration.type ? getTypeFromTypeNode(declaration.type) : unknownType;}Of course you may need to add some type assertions in there. |
| return parameter && parameter.symbol; | ||
| } | ||
| function getAnnotatedAccessorThisType(accessor: AccessorDeclaration): Type | undefined { |
There was a problem hiding this comment.
is this used now?
There was a problem hiding this comment.
Linter would complain if it weren't.
There was a problem hiding this comment.
I looked it up: checkAccessorDeclaration still uses it.
👍 |
Fixes#9198. Closes#9037 because we don't need to prevent renaming if it works.