Extends the fix of #36108 so that the simple example gets correct emit;
the complex test case I came up with still doesn't work correctly, but
the actual code froma #35228 is fixed.
* Special-case window, self, global, globalThis methods
* Disambiguate global and this property completions in details requests
* Hide the Map<boolean> implementation
* Update old tests
* Replace SymbolOriginKind stringification with dedicated enum
* Make never rest type top-like
* Add higher-order test
* properly support types which reduce to never
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Add Advanced Compile Options to --init command
* removed advanced options and descriptioncolumn
* tests: fix tsconfig.json baselines
* tests: fix failing tests
* feat: adjusted link to specification
* fix: removed duplicate increment flag
* chore: moved position back
* return of the comments
* fix for missalignment
* return of the comment
* New diagnostic message for wrong JSX function component
* Component and Mixed type
* fix existing tests
* add new test for JSX component return type error
* fix tslint error
* update diagnostic message to include component name
* accept baseline
* update tests
* missing semicolon
* accept baseline
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
Fixes#34931
This essentially reapplies #24436 which incorrectly updated the generated files rather than the sources, and so was wiped out by 2f73986b44.
Note that this is specifically _not_ the same as #4002, which pertains to the global functions that coerce their arguments and therefore should _not_ accept `unknown`. This change was already accepted 18 months ago, but was applied incorrectly.
* Add test case that shows failure to handle commentDirectives in incremental parsing
Testcase for #37536
* Handle comment directives in incremental parsing
Fixes#37536
* Support completions for local named exports
* Add JSDoc
* Use sort text instead of filtering
* Revert new CompletionKind
* Return valid completions even when export declaration is in an invalid place
* Add test case when the errors are not refreshed if global file is deleted
Testcase for #36728
* When the global file is deleted mark all files as changed
Fixes#36728
* Update other baselines to fix file info
* Sort the arrays of fileNames in the build info
Earlier we did this in testing to ensure we could baseline now moved to actual build info writing
Fixes#37156
* Sort using compareStringsCaseSensitive
* Add test for #35011
When searching for a default configured project, stop at
`node_modules`.
* Be more explicit about inferred projects
* Move test into tsserver/projects.ts
* Use existing helpers to simplify tests
* Enhancement new expression with type arguments without parenthesized argument list error message
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
* add baselines
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
* use parseErrorAt
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
* refine code
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
* Space before paren
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* fix: hyphened name not auto-completed by the ls
* fix: accept new baseline
* Adds a test to validate the hypened identifiers in JSX
Co-authored-by: Orta Therox <orta.therox@gmail.com>
* Add the 'awaited' type operator
* Add script to manually add reviewers to a PR when GH 'Suggested Reviewers' breaks
* Fix lint error in review script
* Only defer generic awaited type for possible thenable
* Add variance-like behavior for awaited
* Switch awaited type params to 'unreliable' variance
* fix typo in inferTypes
* LKG without syntax in lib
* LKG with new syntax in lib
* Add 'strictAwaitedTypes' flag
* Treat strictAwaitedTypes as strict-mode flag
* Rename TAll, remove duplicate definition of 'race'
* Apply suggestions from code review
Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
* Fix inference priority
* Update comment to isGenericAwaitableType
* Add overloads for then/catch to Promise
* Add inference heuristic for T | PromiseLike<T> (for any PromiseLike)
* Remove strictAwaitedTypes flag
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>