typescript 5.0.0-dev.20221206 → 5.0.0-dev.20221207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +174 -139
- package/lib/tsserver.js +153265 -150990
- package/lib/tsserverlibrary.d.ts +19 -6
- package/lib/tsserverlibrary.js +216 -172
- package/lib/typescript.d.ts +19 -6
- package/lib/typescript.js +216 -172
- package/lib/typingsInstaller.js +53 -70
- package/package.json +1 -1
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -9187,7 +9187,7 @@ declare namespace ts {
|
|
|
9187
9187
|
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
|
|
9188
9188
|
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
9189
9189
|
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
9190
|
-
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
|
|
9190
|
+
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, NonRelativeNameResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
|
|
9191
9191
|
}
|
|
9192
9192
|
interface ModeAwareCache<T> {
|
|
9193
9193
|
get(key: string, mode: ResolutionMode): T | undefined;
|
|
@@ -9202,6 +9202,7 @@ declare namespace ts {
|
|
|
9202
9202
|
* This assumes that any module id will have the same resolution for sibling files located in the same folder.
|
|
9203
9203
|
*/
|
|
9204
9204
|
interface PerDirectoryResolutionCache<T> {
|
|
9205
|
+
getFromDirectoryCache(name: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
|
|
9205
9206
|
getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache<T>;
|
|
9206
9207
|
clear(): void;
|
|
9207
9208
|
/**
|
|
@@ -9210,6 +9211,20 @@ declare namespace ts {
|
|
|
9210
9211
|
*/
|
|
9211
9212
|
update(options: CompilerOptions): void;
|
|
9212
9213
|
}
|
|
9214
|
+
interface NonRelativeNameResolutionCache<T> {
|
|
9215
|
+
getFromNonRelativeNameCache(nonRelativeName: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined;
|
|
9216
|
+
getOrCreateCacheForNonRelativeName(nonRelativeName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerNonRelativeNameCache<T>;
|
|
9217
|
+
clear(): void;
|
|
9218
|
+
/**
|
|
9219
|
+
* Updates with the current compilerOptions the cache will operate with.
|
|
9220
|
+
* This updates the redirects map as well if needed so module resolutions are cached if they can across the projects
|
|
9221
|
+
*/
|
|
9222
|
+
update(options: CompilerOptions): void;
|
|
9223
|
+
}
|
|
9224
|
+
interface PerNonRelativeNameCache<T> {
|
|
9225
|
+
get(directory: string): T | undefined;
|
|
9226
|
+
set(directory: string, result: T): void;
|
|
9227
|
+
}
|
|
9213
9228
|
interface ModuleResolutionCache extends PerDirectoryResolutionCache<ResolvedModuleWithFailedLookupLocations>, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache {
|
|
9214
9229
|
getPackageJsonInfoCache(): PackageJsonInfoCache;
|
|
9215
9230
|
}
|
|
@@ -9217,16 +9232,14 @@ declare namespace ts {
|
|
|
9217
9232
|
* Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
|
|
9218
9233
|
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
|
|
9219
9234
|
*/
|
|
9220
|
-
interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
|
|
9235
|
+
interface NonRelativeModuleNameResolutionCache extends NonRelativeNameResolutionCache<ResolvedModuleWithFailedLookupLocations>, PackageJsonInfoCache {
|
|
9236
|
+
/** @deprecated Use getOrCreateCacheForNonRelativeName */
|
|
9221
9237
|
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
|
|
9222
9238
|
}
|
|
9223
9239
|
interface PackageJsonInfoCache {
|
|
9224
9240
|
clear(): void;
|
|
9225
9241
|
}
|
|
9226
|
-
|
|
9227
|
-
get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
9228
|
-
set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
|
|
9229
|
-
}
|
|
9242
|
+
type PerModuleNameCache = PerNonRelativeNameCache<ResolvedModuleWithFailedLookupLocations>;
|
|
9230
9243
|
/**
|
|
9231
9244
|
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
9232
9245
|
*
|