* Initial implementation of variadic tuple types
* Accept new baselines
* Handle variadic elements in tuple type inference
* Special case inference between tuples with matching structure
* Restore check that rest element is last element
* Handle variadic tuples in relationship checking
* Accept new baselines
* Infer readonly constraints when inferring from readonly tuples
* Fix lint issues
* T assignable to readonly [...T] and [...T] assignable to T
* Consistent tuple normalization
* Create variadic tuple types from array literal expressions
* Accept new baselines
* Array literals have tuple types when contextual type is readonly
* Accept new baselines
* Optional elements before required elements become required elements
* Update logic for rest parameters and spread arguments
* Revert special case of contextual readonly array type
* Accept new baselines
* Fix lint issue
* Switch entirely to createTupleType based on element flags
* Don't infer readonly tuple types when inferring to variadic elements
* Handle mapped types applied to generic tuple types
* Handle constraint of indexed access type with generic tuple type
* Accept new baselines
* Address CR feedback
* Simplify indexed access types involving generic tuple types
* Propagate checkMode into getSpreadArgumentType
* Guard against missing globalArrayType
* Inference to [...T, ...U] based on implied arity of T
* Accept new baselines
* Add tests
* Emit .d.ts from tests
* Address CR feedback
* Start experiment
* Add logging
* Go back to a single program
* Fix forEachExternalModuleToImportFrom
* Move auxiliary program to language service
* Add logging
* Don’t use resolution cache
* Fix(?) containingProjects for ScriptInfo in auxiliary program
* Fix ScriptInfo project inclusion
* Add test for default project of auto-importable ScriptInfo
* Add fourslash server test
* Don’t create auto import provider inside node_modules
* Add monorepo-like test
* WIP
* Naively ensure autoImportProvider is up to date after package.json change
* Start limiting when auto update provider gets updated
* Respond to changes in node_modules
* Don’t create auto-import provider until a file is open that would use it
e.g., don’t create them during cross-project find-all-refs
* Clean up naming, @internal marking, and fix empty project creation bug
* Drop devDependencies, include peerDependencies
* Add additional compiler options
* Fix interaction with importSuggestionsCache
* Move option to UserPreferences, allow inclusion of devDependencies
* Don’t filter out peerDependencies
* Watch unparseable package.jsons
* But don’t filter packages out due to an invalid package.json
* Update test
* Don’t use autoImportProvider in codefixes where it can never be used (or any refactors)
* Add CompletionEntry property for telemetry
* Add assertion for isPackageJsonImport to fourslash
* Fix missing pushSymbol argument
* Add isPackageJsonImport to tests and API baselines
* Fix unit test
* Host auto import provider in new Project kind
* Fix InferredProject attaching on AutoImportProvider-included files, load eagerly
* Update Public APIs
* Simplify PackageJsonCache host
* Remove unneeded markAsDirty
* Defer project finished event until after AutoImportProvider is created
* Make AutoImportProviderProject always report isOrphan = true
* Close and remove AutoImportProviderProject when host project closes
* Don’t set pendingEnsureProjectForOpenFiles
* Use hasAddedOrRemovedFiles instead of hasNewProgram
* Use host-wide watchOptions for package.json watching
* Add to `printProjects`
* Clean up
* Get autoImportProvider directly from LanguageServiceHost
* Clean up
* Clean up
* Close auto import provider on disableLanguageService
* Move AutoImportProvider preload to project updateGraph
* Clear auto import suggestion cache when provider program changes
* Fix tests
* Revert yet-unneeded change
* Use projectService host for module resolution host
* Don’t re-resolve type directives if nothing has changed
* Update src/server/project.ts
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Use ts.emptyArray
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* update toLocalString function signature
* update test.
* fix lint
* follow review advice.
* format and better comment.
* format
* add case
* fix symbol.
* remove subtype and string union in interface.
* remove useless code.
Co-authored-by: Song Gao <song.gao@laserfiche.com>
This makes the language service treat .js files inside node_modules as
part of the parent project, so that you can view the same errors in the
editor as you see in the baselines.
Also update a comment in the parser that I missed in an earlier PR.