| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Regression test for #10972
Sorry, something went wrong.
There was a problem hiding this comment.
One minor comment — there is a utility for checking the this parameter already.
Sorry, something went wrong.
| // 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.
This can be written as !parameterIsThisKeyword(firstOrUndefined(node.parameters))
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR supersedes #11529 and #11600. Thanks to Herrington Darkholme (@HerringtonDarkholme) for the original idea regarding type inference and contextual typing of partially annotated signatures.
We probably want to move the tests over from #11529. Nathan Shively-Sanders (@sandersn) Maybe you want to look at that?
Fixes #4241.
Fixes #9648.
Fixes #10850.
Fixes #10972.