GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — Contextual typing of partially annotated signatures by ahejlsberg · Pull Request #11673 · microsoft/TypeScript Conversation
|
|
OK, I merged the tests from #11529. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Regression test for #10972
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
One minor comment — there is a utility for checking the this parameter already.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // know that all parameters (including 'this') have type annotations and nothing is | ||
| // subject to contextual typing. | ||
| const parameter = firstOrUndefined(node.parameters); | ||
| return !(parameter && parameter.name.kind === SyntaxKind.Identifier && (<Identifier>parameter.name).text === "this"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This can be written as !parameterIsThisKeyword(firstOrUndefined(node.parameters))
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.