@typescript-deploys/pr-build 5.0.0-pr-50996-2 → 5.0.0-pr-51492-2
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 +47 -55
- package/lib/tsserver.js +64 -311
- package/lib/tsserverlibrary.d.ts +25 -24
- package/lib/tsserverlibrary.js +65 -312
- package/lib/typescript.d.ts +23 -22
- package/lib/typescript.js +52 -295
- package/package.json +1 -1
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -3185,8 +3185,8 @@ declare namespace ts {
|
|
|
3185
3185
|
fileExists(file: string): boolean;
|
|
3186
3186
|
resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModuleFull | undefined)[];
|
|
3187
3187
|
getModuleResolutionCache(): ModuleResolutionCache | undefined;
|
|
3188
|
-
getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string, resolutionMode?:
|
|
3189
|
-
resolveTypeReferenceDirectives(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingFileMode?:
|
|
3188
|
+
getResolvedModuleWithFailedLookupLocationsFromCache(moduleName: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
3189
|
+
resolveTypeReferenceDirectives(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
3190
3190
|
directoryExists(path: string): boolean;
|
|
3191
3191
|
getDirectories(path: string): string[];
|
|
3192
3192
|
log(s: string): void;
|
|
@@ -5761,7 +5761,7 @@ declare namespace ts {
|
|
|
5761
5761
|
}
|
|
5762
5762
|
interface FileReference extends TextRange {
|
|
5763
5763
|
fileName: string;
|
|
5764
|
-
resolutionMode?:
|
|
5764
|
+
resolutionMode?: ResolutionMode;
|
|
5765
5765
|
}
|
|
5766
5766
|
interface CheckJsDirective extends TextRange {
|
|
5767
5767
|
enabled: boolean;
|
|
@@ -6039,6 +6039,7 @@ declare namespace ts {
|
|
|
6039
6039
|
interface SourceFileLike {
|
|
6040
6040
|
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
|
6041
6041
|
}
|
|
6042
|
+
type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
|
|
6042
6043
|
interface SourceFile extends Declaration {
|
|
6043
6044
|
readonly kind: SyntaxKind.SourceFile;
|
|
6044
6045
|
readonly statements: NodeArray<Statement>;
|
|
@@ -6079,7 +6080,7 @@ declare namespace ts {
|
|
|
6079
6080
|
* of `node`). If so, this field will be unset and source files will be considered to be
|
|
6080
6081
|
* CommonJS-output-format by the node module transformer and type checker, regardless of extension or context.
|
|
6081
6082
|
*/
|
|
6082
|
-
impliedNodeFormat?:
|
|
6083
|
+
impliedNodeFormat?: ResolutionMode;
|
|
6083
6084
|
}
|
|
6084
6085
|
interface SourceFile {
|
|
6085
6086
|
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
|
@@ -7343,7 +7344,7 @@ declare namespace ts {
|
|
|
7343
7344
|
/**
|
|
7344
7345
|
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
|
7345
7346
|
*/
|
|
7346
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
7347
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
7347
7348
|
getEnvironmentVariable?(name: string): string | undefined;
|
|
7348
7349
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
7349
7350
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
@@ -9073,7 +9074,7 @@ declare namespace ts {
|
|
|
9073
9074
|
* and files on disk, but needs to be done with a module resolution cache in scope to be performant.
|
|
9074
9075
|
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
|
|
9075
9076
|
*/
|
|
9076
|
-
impliedNodeFormat?:
|
|
9077
|
+
impliedNodeFormat?: ResolutionMode;
|
|
9077
9078
|
/**
|
|
9078
9079
|
* Controls how module-y-ness is set for the given file. Usually the result of calling
|
|
9079
9080
|
* `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
|
|
@@ -9172,7 +9173,7 @@ declare namespace ts {
|
|
|
9172
9173
|
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
|
|
9173
9174
|
* is assumed to be the same as root directory of the project.
|
|
9174
9175
|
*/
|
|
9175
|
-
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?:
|
|
9176
|
+
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: ResolutionMode): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
|
9176
9177
|
/**
|
|
9177
9178
|
* Given a set of options, returns the set of type directive names
|
|
9178
9179
|
* that should be included for this program automatically.
|
|
@@ -9184,18 +9185,18 @@ declare namespace ts {
|
|
|
9184
9185
|
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
|
|
9185
9186
|
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
|
|
9186
9187
|
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
|
|
9187
|
-
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?:
|
|
9188
|
-
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?:
|
|
9188
|
+
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
9189
|
+
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
|
|
9189
9190
|
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
9190
9191
|
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
9191
9192
|
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
|
|
9192
9193
|
}
|
|
9193
9194
|
interface ModeAwareCache<T> {
|
|
9194
|
-
get(key: string, mode:
|
|
9195
|
-
set(key: string, mode:
|
|
9196
|
-
delete(key: string, mode:
|
|
9197
|
-
has(key: string, mode:
|
|
9198
|
-
forEach(cb: (elem: T, key: string, mode:
|
|
9195
|
+
get(key: string, mode: ResolutionMode): T | undefined;
|
|
9196
|
+
set(key: string, mode: ResolutionMode, value: T): this;
|
|
9197
|
+
delete(key: string, mode: ResolutionMode): this;
|
|
9198
|
+
has(key: string, mode: ResolutionMode): boolean;
|
|
9199
|
+
forEach(cb: (elem: T, key: string, mode: ResolutionMode) => void): void;
|
|
9199
9200
|
size(): number;
|
|
9200
9201
|
}
|
|
9201
9202
|
/**
|
|
@@ -9219,7 +9220,7 @@ declare namespace ts {
|
|
|
9219
9220
|
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
|
|
9220
9221
|
*/
|
|
9221
9222
|
interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
|
|
9222
|
-
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode:
|
|
9223
|
+
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
|
|
9223
9224
|
}
|
|
9224
9225
|
interface PackageJsonInfoCache {
|
|
9225
9226
|
clear(): void;
|
|
@@ -9327,7 +9328,7 @@ declare namespace ts {
|
|
|
9327
9328
|
* Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
|
|
9328
9329
|
* provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
|
|
9329
9330
|
*/
|
|
9330
|
-
function getModeForFileReference(ref: FileReference | string, containingFileMode:
|
|
9331
|
+
function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ts.ResolutionMode;
|
|
9331
9332
|
/**
|
|
9332
9333
|
* Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
|
|
9333
9334
|
* defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
|
|
@@ -9335,7 +9336,7 @@ declare namespace ts {
|
|
|
9335
9336
|
* @param file File to fetch the resolution mode within
|
|
9336
9337
|
* @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations
|
|
9337
9338
|
*/
|
|
9338
|
-
function getModeForResolutionAtIndex(file: SourceFile, index: number):
|
|
9339
|
+
function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode;
|
|
9339
9340
|
/**
|
|
9340
9341
|
* Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
|
|
9341
9342
|
* one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
|
|
@@ -9346,7 +9347,7 @@ declare namespace ts {
|
|
|
9346
9347
|
* @returns The final resolution mode of the import
|
|
9347
9348
|
*/
|
|
9348
9349
|
function getModeForUsageLocation(file: {
|
|
9349
|
-
impliedNodeFormat?:
|
|
9350
|
+
impliedNodeFormat?: ResolutionMode;
|
|
9350
9351
|
}, usage: StringLiteralLike): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined;
|
|
9351
9352
|
function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
|
|
9352
9353
|
/**
|
|
@@ -9359,7 +9360,7 @@ declare namespace ts {
|
|
|
9359
9360
|
* @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution`
|
|
9360
9361
|
* @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format
|
|
9361
9362
|
*/
|
|
9362
|
-
function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions):
|
|
9363
|
+
function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode;
|
|
9363
9364
|
/**
|
|
9364
9365
|
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
|
9365
9366
|
* that represent a compilation unit.
|
|
@@ -9617,7 +9618,7 @@ declare namespace ts {
|
|
|
9617
9618
|
/** If provided, used to resolve the module names, otherwise typescript's default module resolution */
|
|
9618
9619
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
|
|
9619
9620
|
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
|
|
9620
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
9621
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
9621
9622
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
9622
9623
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
9623
9624
|
/**
|
|
@@ -9850,8 +9851,8 @@ declare namespace ts {
|
|
|
9850
9851
|
fileExists(path: string): boolean;
|
|
9851
9852
|
getTypeRootsVersion?(): number;
|
|
9852
9853
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
|
|
9853
|
-
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?:
|
|
9854
|
-
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
9854
|
+
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
9855
|
+
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
9855
9856
|
getDirectories?(directoryName: string): string[];
|
|
9856
9857
|
/**
|
|
9857
9858
|
* Gets a set of custom transformers to use during emit.
|
|
@@ -10982,11 +10983,11 @@ declare namespace ts {
|
|
|
10982
10983
|
* @param scriptKind The script kind of the file to be released
|
|
10983
10984
|
* @param impliedNodeFormat The implied source file format of the file to be released
|
|
10984
10985
|
*/
|
|
10985
|
-
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat:
|
|
10986
|
+
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
|
|
10986
10987
|
/**
|
|
10987
10988
|
* @deprecated pass scriptKind for and impliedNodeFormat correctness */
|
|
10988
10989
|
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void;
|
|
10989
|
-
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat:
|
|
10990
|
+
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
|
|
10990
10991
|
reportStats(): string;
|
|
10991
10992
|
}
|
|
10992
10993
|
type DocumentRegistryBucketKey = string & {
|