| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| const binaryExpression = token.parent.parent as BinaryExpression; | ||
|
|
||
| const checker = context.program.getTypeChecker(); | ||
| const widenedType = checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(binaryExpression.right)); |
There was a problem hiding this comment.
you also want to widen it. i.e. null => any
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good. just add the getWidenedType call
Sorry, something went wrong.
| }] | ||
| }, | ||
| { | ||
| description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Add_index_accessor_for_missing_property_0), [token.getText()]), |
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
changed and test added
Sorry, something went wrong.
|
Arthur Ozga (@aozgaa) after merging in master please port this to release-2.2 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Implements #13071.
Note that there is considerably more work to do for stubbing out missing methods if we want to do any type inference on the parameters. There are additionally issues with inferring type parameters for the stubbed method from its type arguments.
Thoughts Mohamed Hegazy (@mhegazy) Bill Ticehurst (@billti) Daniel Rosenwasser (@DanielRosenwasser) ?