* Make the non relative name resolution cache generic
* Add cache for non relative type reference resolution
* Add getter only methods so we can use these in future for sharing resolutions across the projects
* Mark existing non relative module name cache getOrCreate as deprecated
* Prefer getters for getting directory results
* Fix missed errors in switch when using union of literal and non-literal types (#38686)
This commit makes it so we don’t use the base type of literals when checking comparability in switch. The comparability checks handle that case already, is my understanding, so we don’t need to clobber the type before actually doing the check, causing missed errors.
When comparing the types in switch, if a union with a literal and a non-literal was used, the compiler in `checker.ts` would automatically get the base type of all parts of the union, resulting in missed errors. For example, if the union of the non-literal `number` and literal `"hello"` was compared to the literal `"world"` in a switch case, the compiler would miss that they’re actually not comparable.
Maybe someone can tell me why we were getting the base type before checking comparability, rather than relying on the logic within the comparability checks to handle literal/base type comparability?
* Fix lint (whitespace) issue in checker.ts by running lint with fix flag.
* Remove webServer
First draft; I may move some things around to be more readable.
* Refactor moved code
1. Move StartSessionOptions to common next to where it's first used.
2. Inline single-use BaseLogger base class into its only child class,
Logger.
3. Start using direct imports, eg `import {} from './common'`. I hope
this is OK?!
* Fix lint
* move imports back to namespace import
* hereby tsserver: remove exportIsTsObject
* Refactoring so CacheWithRedirects has Key and Value type parameters
* ModuleResolutionCache or TypeRefDirectiveCache will look in directory before solving, so ResolutionCache doesnt need this check
* Test showing module resolution is not shared because resolution cache doesnt update own options
* Enable traceResolution on some of the project reference tests
* Simplify CacheWithRedirects and ensure the options are set in all common scenarios so cache can be shared between redirects
* Make failedlookup etc optional in ResolvedModule/TypeRefefWithFailedLookupLocations
Also make accidental public failed lookup internal
* Add new API for module and type ref resolution
* Store auto type reference resolutions
* Modify test to show how using program partially doesnt report resolution diagnostics
* Ensure that resolution diagnostics are reported in filePreocessingDiagnostics so they can be reused when program is reused
* Some cleanup
* Remove the newly added ReoslutionInfo in favor of new APIs
* update
* fix services' type's isLiteral
* update literal completions tests
* initial prototype
* use symbol to expression. TODO: filter existing, replace import nodes
* WIP
* WIP
* remove booleans from literals
* trigger at case keyword positions
* clean up tests
* fix element access expression case
* refactor dealing with existing values into a tracker
* fix merge errors
* cleanup and more tests
* fix lint errors
* more merge conflict fixes and cleanup
* use appropriate quotes
* small indentation fix
* refactor case clause tracker
* experiment: support tabstops after each case clause
* address small CR comments
* fix completion entry details; add test case
* fix lint errors
* remove space before tab stops; refactor
* Refactoring so CacheWithRedirects has Key and Value type parameters
* ModuleResolutionCache or TypeRefDirectiveCache will look in directory before solving, so ResolutionCache doesnt need this check
* Test showing module resolution is not shared because resolution cache doesnt update own options
* Enable traceResolution on some of the project reference tests
* Simplify CacheWithRedirects and ensure the options are set in all common scenarios so cache can be shared between redirects
* When fsEvent for change is repeated
* When trying to check if program is uptodate, read the files from disk to determine the version instead of delaying so that new program is not created if file contents have not changed