Commit Graph

33173 Commits

Author SHA1 Message Date
Nathan Shively-Sanders bb00916cd4 clean up oodate TODOs 2022-03-31 08:37:27 -07:00
Nathan Shively-Sanders 11717fedac fix lint 2022-03-31 07:48:22 -07:00
Nathan Shively-Sanders 22c9470b69 Add tsserver entrypoint for vfs 2022-03-30 08:21:07 -07:00
Nathan Shively-Sanders 197308efc1 Merge branch 'main' into server-vfs-support 2022-03-29 09:01:23 -07:00
Oleksandr T bf7bfa1b3f fix(48445): show errors on type-only import/export specifiers in JavaScript files (#48449) 2022-03-29 08:38:58 -07:00
Andrew Branch d962091d94 Fix newline inserted in empty block at end of formatting range (#48463)
* Fix newline inserted in empty block at end of formatting range

* Clean up

* Fix refactoring mistake
2022-03-28 13:50:17 -07:00
Wesley Wigham a5dae37943 Prevent looking up symbol for as const from triggering an error (#48464) 2022-03-28 12:53:36 -07:00
Nathan Shively-Sanders a1b9983cdc Tests pass again
Next: Make a way to create a vfs server from the start.
2022-03-28 11:22:08 -07:00
Anders Hejlsberg df7ed82dd5 Revise accessor resolution logic and error reporting (#48459)
* Revise accessor resolution logic and error reporting

* Accept new baselines

* Update isTypeElement

* Add tests
2022-03-28 10:44:11 -07:00
Oleksandr T c720ad6ffb fix(48166): skip checking module.exports in a truthiness call expression (#48337) 2022-03-28 08:23:20 -07:00
csigs eb95b32dfb LEGO: Merge pull request 48450
LEGO: Merge pull request 48450
2022-03-27 02:49:35 -07:00
csigs 1ed1a2394e LEGO: Merge pull request 48436
LEGO: Merge pull request 48436
2022-03-26 02:55:15 -07:00
Nathan Shively-Sanders 978c0bc50f Tests build and run
But editorServices needs some fixes. At least, createDirectory needs a
recursive version.
2022-03-25 15:39:17 -07:00
Oleksandr T f4d76e5b93 fix(48031): show circularity error for self referential get accessor annotations (#48050) 2022-03-25 15:36:22 -07:00
Andrew Casey e7426251b0 Revert "Fix contextual discrimination for omitted members (#43937)" (#48426)
This reverts commit 751c114126, which caused check time for our MUI benchmark to increase by ~25%.
2022-03-25 13:09:19 -07:00
Nathan Shively-Sanders 050e058723 Switch to virtualFileSystemWithWatch, move other files back
Doesn't quite build yet, uploading so I can use github to view the diff.
2022-03-25 09:50:02 -07:00
Oleksandr T 0cc3535cae revert #44956 - remove hyphen separator (#48416) 2022-03-25 08:21:57 -07:00
Mateusz Burzyński 3ec1b04808 Add explicit tests for unconstrained type param not being assignable to {} and Record<string, any> (#48421) 2022-03-25 05:36:02 -07:00
csigs a7608e1d31 LEGO: Merge pull request 48422
LEGO: Merge pull request 48422
2022-03-25 02:48:57 -07:00
Oleksandr T 49a12dcbbb fix(47081): show completion list in parenthesized object literal arguments (#47104) 2022-03-24 15:30:26 -07:00
Wesley Wigham 8907d7a675 Fix test build post-LKG (#48403) 2022-03-24 12:55:27 -07:00
Nathan Shively-Sanders 85eee48f2a Copy file watching from virtualFileSystemWithWatch
Shortly to be undone, but whatever.
2022-03-24 08:26:45 -07:00
csigs 4fdc4fd6b6 LEGO: Merge pull request 48400
LEGO: Merge pull request 48400
2022-03-24 02:52:05 -07:00
TypeScript Bot 2b7bd85935 Update package-lock.json 2022-03-24 06:06:26 +00:00
Wesley Wigham 8cd4b7a5da Make the unconstrained type parameter and {} assignability rule not apply under strictNullChecks (#48366)
* Make the unconstrained type parameter and {} assignability rule not apply under strictNullChecks

* Fix lint, PR feedback
2022-03-23 16:22:40 -07:00
Wesley Wigham b5a3a058f5 Merge diagnosticsProducing and nonDiagnosticsProducing checkers into a single checker supporting lazy diagnostics (#36747)
* Merge diagnosticsProducing and nonDiagnosticsProducing checkers into a single checker supporting lazy diagnostics

* Fix lint
2022-03-23 16:21:06 -07:00
Wesley Wigham 26c701c351 Fix document registry cache key calculation for paths compiler option (#48389)
* Fix document registry cache key calculation for `paths` compiler option

* PR feedback
2022-03-23 15:57:39 -07:00
Zzzen 20c01cdd3f align ClassStaticBlockDeclaration with IIFE in CFA (#44969)
* align ClassStaticBlockDeclaration with IIFE in CFA

* isIIFELike => isImmediatelyInvoked

* fix unexpected used-before-assignment errors

* update baseline
2022-03-23 15:47:29 -07:00
Minh Quy 4ec16b2a6b Fix#48281 - Indentation not respected when executing various refactorings (TypeScript/JavaScript) (#48340)
* fix(48281) - Preserve indentation when adding missing properties

* fix(48281) - Fix object literal indentation like block

* fix(48281) - Indentation for object literal started with curly brace similar to block
2022-03-23 10:40:50 -07:00
gfyoung ba3645e034 fix(48218): Split Intl.DisplayNames options (#48262)
Closes https://github.com/microsoft/TypeScript/issues/48218
2022-03-22 17:22:30 -07:00
islandryu bf0eef4353 fix(48034): Get a literal string of type intersection in a template literal type (#48044) 2022-03-22 13:38:24 -07:00
Anders Hejlsberg 6cb58d382f Optional variance annotations (#48240)
* Simplify getVariancesWorker and associated logic

* Accept new API baselines

* Add 'in' and 'out' modififers / add modifiers to type parameters

* Check variance annotations

* Update test runner

* Accept new API baselines

* Allow variance annotations only on certain type parameters

* Add deprecated implementation of createTypeParameterDeclaration

* Accept new API baselines

* Report variance markers as 'sub-XXX' and 'super-XXX'

* Add tests

* Accept new baselines
2022-03-22 11:31:08 -07:00
Jm fdb1c2fc35 fix: export default anonymous function works with prefixText and suffixText when disabled (#48259) 2022-03-22 10:43:41 -07:00
Pablo Sabater Jiménez 50a4b92bca fix(48053) Description of tsBuildInfoFile is misleading in generated tsconfig.json (#48072)
* add check for path default value

* fix wrong tsBuildInfoFile description

* updated files to file
2022-03-22 10:35:47 -07:00
csigs 45c1e58809 LEGO: Merge pull request 48371
LEGO: Merge pull request 48371
2022-03-22 02:50:20 -07:00
TypeScript Bot 7f1ec30b8e Update package-lock.json 2022-03-22 06:06:20 +00:00
Andrew Branch 5bc8179b73 Make AutoImportProvider look in ATA cache (#48329)
* Make AutoImportProvider consider ATA cache

* Delete unnecessary test
2022-03-21 17:02:44 -07:00
csigs f9e6ba38f1 LEGO: Merge pull request 48346
LEGO: Merge pull request 48346
2022-03-21 02:49:39 -07:00
csigs 92af654a83 LEGO: Merge pull request 48342
LEGO: Merge pull request 48342
2022-03-20 02:50:17 -07:00
Andrew Casey 073ac920ad Add server tracepoints (#48282)
* Trace project creation, loading, and updateGraph

* Drop generic event tracing

* Make argument names more consistent

* Trace diagnostics to make steps easier to interpret

* Fill an unexplained gap in updateGraph

* Move updateGraph tracing into base type

* Fill the gaps in updateGraph
2022-03-17 14:56:42 -07:00
Oleksandr T c1cf901997 fix(48291): omit jsdoc modifiers (#48304) 2022-03-17 13:44:42 -07:00
Thai Pangsakulyanont 9a2868bf98 Infer extracted local variable name from property name (#37902) 2022-03-17 13:39:13 -07:00
Andrew Branch df1faa09b8 Add isolatedModules error for ambiguous imports referenced in decorator metadata (#42915)
* Add isolatedModules error for ambiguous imports referenced in decorator metadata

* Improve test and accept baselines

* Error only for es2015+

* Add namespace import to error message as workaround

* Add codefix

* Fix merge fallout
2022-03-17 12:00:23 -07:00
Minh Quy b996287e00 fix(48191): Duplicates comments on "Add definite assignment assertion to property" (#48299)
* Suppress leading and trailing comments for adding missing definite assignment assertion action

* Suppress leading and trailing comments for adding missing initalizer action

* Test for initializer property action
2022-03-17 09:57:10 -07:00
Oleksandr T 546a87fa31 feat(48231): allow unique symbol for constant variables (#48270) 2022-03-16 17:00:27 -07:00
Gabriela Araujo Britto cf8ed8fec1 Change sortText for class member completions (#48196)
* change sortText for class member completions

* update test

* create new sort text member for class snippets

* change values of sort text enum
2022-03-16 16:04:08 -07:00
Oleksandr T f12922c8f7 fix(48277): show parameter type inlay hints after ? operator (#48283) 2022-03-16 11:38:40 -07:00
Wesley Wigham 7f652509b6 Handle JS synthetic rest args in contextual parameter assignment (#48263)
* Handle JS synthetic rest args in contextual parameter assignment

* Limit fixing to only unannotated js rest parameters

* Minimize test

* Add annotated version

* Remove explicit CheckFlags.RestParameter check since apparently not all rest parameters are CheckFlags.RestParameter
2022-03-16 11:04:07 -07:00
Nathan Shively-Sanders c4eb15c463 Merge branch 'main' into server-vfs-support 2022-03-16 08:12:31 -07:00
Wesley Wigham 92bc2ddc3c Consistently avoid pulling on the source return type when the target return type is any (#47306) 2022-03-15 18:16:05 -07:00