Switches the error message emitted by the parser to the more specific _"An enum member name must be followed by a ',' or '='."_ when the expected comma doesn't follow the member.
`Number.MAX_SAFE_INTEGER` is `2 ** 53 - 1`, so anything greater than that is a 'dangerous' integer to store as a traditional number. This adds a codefix to suggest converting them to a `bigint` literal.
* Improve codeFixAll for add missing await
* Improve add missing await for initializers and fix-all
* Fix when only one side of a binary expression can have its initializer fixed
* Add error message for keywords with escapes in them
* Move check into parser during advance to next token to utilize context for contextual keywords
* git add .
* Add tests for extended escapes
* Better error courtesy of @DanielRossenwaser
* Add test of browser-inconsistent case and alter condition to match spec
* Merge adjacent conditions
* Use seperate functions for checking keywords vs not
* Use flags to track unicode escape presence
* Adjust error text
* Parse quoted constructors as constructors, not methods
* Update baselines
* Fix disambiguation between quoted constructor and property named constructor
* Clean up parsing a bit
* Support escapes in constructor name
* Update baselines
* Add remove unnecessary await fix
* Add test for removing unnecessary parens after await is gone
* Fix handling of numbers in property access expressions
* Don’t offer suggestion when awaited type is any/unknown
* Fix random other test
* Fix new expression edge cases
* Only remove parens for identifiers and call expressions
* Start prototyping addMissingAwait codefix
* Filter by diagnostics that have missing-await related info
* Start writing tests and checking precedence
* Implement codeFixAll, add test for binary expressions
* Add test for iterables
* Add test for passing argument
* Add test for call/construct signatures
* Add test for awaiting initializer
* Improve assertion error
* Replace specific property access error with general one and add await related info
* Add test for property access
* Require code to be inside a function body to offer await
* Accept suggestion
Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Add explicit test for code fix being not available unless something is a Promise
* Skip looking for function body if already in AwaitContext flags
* Inline getCodeActions function for symmetry
* Improve typing for Generators and Async Generators
* Add TReturn and TNext to Iterator, IterableIterator, etc.
* Update ts internal Iterator to be assignable from global Iterator
* Make 'done' optional in IteratorYieldResult
* Revert Iterable and IterableIterator to simpler versions plus other fixes
* Add additional inference tests
* Added additional tests
* PR cleanup and minor async iteration type fix
* Updated diagnostics message and added non-strict tests
* Fix expected arity of Iterator/AsyncIterator
If there are multiple diagnostics per signature, choose the signature
with the fewer diagnostics to report. If there are more than one with
the minimum, choose the latest in the overload set.
* Added --noImplicitThis code fix for functions used as object properties
Before trying out all the various possibilities for where these functions could be used, I figured I'd start out with a relatively simple use case to verify this is the right approach. Is it? 😄
Starts on #28964.
* Fixed function expression names; included new baselines
* Got JSDocs to work, hooray!
* Added test for 'any' case of no function uses
* Refactored for inferFunctionReferencesFromUsage
* Fixed inference bug: undefined references cause parameters to default
* Removed dead code comments
* Improved error messages when indexing an object type with a literal string, a literal string union or a string.
* Added more specific message when using the indexing operator with an incompatible index argument.
* Fixed spelling and error message.