@typescript-deploys/pr-build 5.0.0-pr-50996-2 → 5.0.0-pr-50996-9
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/lib.es2015.core.d.ts +2 -2
- package/lib/lib.es5.d.ts +1 -1
- package/lib/tsc.js +353 -415
- package/lib/tsserver.js +827 -835
- package/lib/tsserverlibrary.d.ts +27 -28
- package/lib/tsserverlibrary.js +840 -838
- package/lib/typescript.d.ts +25 -26
- package/lib/typescript.js +823 -822
- package/lib/typingsInstaller.js +149 -221
- package/package.json +1 -1
package/lib/typescript.d.ts
CHANGED
|
@@ -1825,7 +1825,7 @@ declare namespace ts {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
interface FileReference extends TextRange {
|
|
1827
1827
|
fileName: string;
|
|
1828
|
-
resolutionMode?:
|
|
1828
|
+
resolutionMode?: ResolutionMode;
|
|
1829
1829
|
}
|
|
1830
1830
|
interface CheckJsDirective extends TextRange {
|
|
1831
1831
|
enabled: boolean;
|
|
@@ -2103,6 +2103,7 @@ declare namespace ts {
|
|
|
2103
2103
|
interface SourceFileLike {
|
|
2104
2104
|
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
|
2105
2105
|
}
|
|
2106
|
+
type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
|
|
2106
2107
|
interface SourceFile extends Declaration {
|
|
2107
2108
|
readonly kind: SyntaxKind.SourceFile;
|
|
2108
2109
|
readonly statements: NodeArray<Statement>;
|
|
@@ -2143,7 +2144,7 @@ declare namespace ts {
|
|
|
2143
2144
|
* of `node`). If so, this field will be unset and source files will be considered to be
|
|
2144
2145
|
* CommonJS-output-format by the node module transformer and type checker, regardless of extension or context.
|
|
2145
2146
|
*/
|
|
2146
|
-
impliedNodeFormat?:
|
|
2147
|
+
impliedNodeFormat?: ResolutionMode;
|
|
2147
2148
|
}
|
|
2148
2149
|
interface SourceFile {
|
|
2149
2150
|
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
|
@@ -2782,6 +2783,7 @@ declare namespace ts {
|
|
|
2782
2783
|
interface EnumType extends Type {
|
|
2783
2784
|
}
|
|
2784
2785
|
enum ObjectFlags {
|
|
2786
|
+
None = 0,
|
|
2785
2787
|
Class = 1,
|
|
2786
2788
|
Interface = 2,
|
|
2787
2789
|
Reference = 4,
|
|
@@ -2952,6 +2954,7 @@ declare namespace ts {
|
|
|
2952
2954
|
declaration?: IndexSignatureDeclaration;
|
|
2953
2955
|
}
|
|
2954
2956
|
enum InferencePriority {
|
|
2957
|
+
None = 0,
|
|
2955
2958
|
NakedTypeVariable = 1,
|
|
2956
2959
|
SpeculativeTuple = 2,
|
|
2957
2960
|
SubstituteSource = 4,
|
|
@@ -3407,7 +3410,7 @@ declare namespace ts {
|
|
|
3407
3410
|
/**
|
|
3408
3411
|
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
|
3409
3412
|
*/
|
|
3410
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
3413
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
3411
3414
|
getEnvironmentVariable?(name: string): string | undefined;
|
|
3412
3415
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
3413
3416
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
@@ -5137,7 +5140,7 @@ declare namespace ts {
|
|
|
5137
5140
|
* and files on disk, but needs to be done with a module resolution cache in scope to be performant.
|
|
5138
5141
|
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
|
|
5139
5142
|
*/
|
|
5140
|
-
impliedNodeFormat?:
|
|
5143
|
+
impliedNodeFormat?: ResolutionMode;
|
|
5141
5144
|
/**
|
|
5142
5145
|
* Controls how module-y-ness is set for the given file. Usually the result of calling
|
|
5143
5146
|
* `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
|
|
@@ -5236,7 +5239,7 @@ declare namespace ts {
|
|
|
5236
5239
|
* This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
|
|
5237
5240
|
* is assumed to be the same as root directory of the project.
|
|
5238
5241
|
*/
|
|
5239
|
-
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?:
|
|
5242
|
+
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: ResolutionMode): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
|
|
5240
5243
|
/**
|
|
5241
5244
|
* Given a set of options, returns the set of type directive names
|
|
5242
5245
|
* that should be included for this program automatically.
|
|
@@ -5248,18 +5251,18 @@ declare namespace ts {
|
|
|
5248
5251
|
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
|
|
5249
5252
|
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
|
|
5250
5253
|
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
|
|
5251
|
-
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?:
|
|
5252
|
-
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?:
|
|
5254
|
+
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
5255
|
+
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
|
|
5253
5256
|
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
5254
5257
|
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
|
|
5255
5258
|
interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
|
|
5256
5259
|
}
|
|
5257
5260
|
interface ModeAwareCache<T> {
|
|
5258
|
-
get(key: string, mode:
|
|
5259
|
-
set(key: string, mode:
|
|
5260
|
-
delete(key: string, mode:
|
|
5261
|
-
has(key: string, mode:
|
|
5262
|
-
forEach(cb: (elem: T, key: string, mode:
|
|
5261
|
+
get(key: string, mode: ResolutionMode): T | undefined;
|
|
5262
|
+
set(key: string, mode: ResolutionMode, value: T): this;
|
|
5263
|
+
delete(key: string, mode: ResolutionMode): this;
|
|
5264
|
+
has(key: string, mode: ResolutionMode): boolean;
|
|
5265
|
+
forEach(cb: (elem: T, key: string, mode: ResolutionMode) => void): void;
|
|
5263
5266
|
size(): number;
|
|
5264
5267
|
}
|
|
5265
5268
|
/**
|
|
@@ -5283,7 +5286,7 @@ declare namespace ts {
|
|
|
5283
5286
|
* We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
|
|
5284
5287
|
*/
|
|
5285
5288
|
interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
|
|
5286
|
-
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode:
|
|
5289
|
+
getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
|
|
5287
5290
|
}
|
|
5288
5291
|
interface PackageJsonInfoCache {
|
|
5289
5292
|
clear(): void;
|
|
@@ -5391,7 +5394,7 @@ declare namespace ts {
|
|
|
5391
5394
|
* Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
|
|
5392
5395
|
* provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
|
|
5393
5396
|
*/
|
|
5394
|
-
function getModeForFileReference(ref: FileReference | string, containingFileMode:
|
|
5397
|
+
function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ts.ResolutionMode;
|
|
5395
5398
|
/**
|
|
5396
5399
|
* Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
|
|
5397
5400
|
* 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).
|
|
@@ -5399,7 +5402,7 @@ declare namespace ts {
|
|
|
5399
5402
|
* @param file File to fetch the resolution mode within
|
|
5400
5403
|
* @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
|
|
5401
5404
|
*/
|
|
5402
|
-
function getModeForResolutionAtIndex(file: SourceFile, index: number):
|
|
5405
|
+
function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode;
|
|
5403
5406
|
/**
|
|
5404
5407
|
* Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
|
|
5405
5408
|
* one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
|
|
@@ -5410,7 +5413,7 @@ declare namespace ts {
|
|
|
5410
5413
|
* @returns The final resolution mode of the import
|
|
5411
5414
|
*/
|
|
5412
5415
|
function getModeForUsageLocation(file: {
|
|
5413
|
-
impliedNodeFormat?:
|
|
5416
|
+
impliedNodeFormat?: ResolutionMode;
|
|
5414
5417
|
}, usage: StringLiteralLike): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined;
|
|
5415
5418
|
function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
|
|
5416
5419
|
/**
|
|
@@ -5423,7 +5426,7 @@ declare namespace ts {
|
|
|
5423
5426
|
* @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution`
|
|
5424
5427
|
* @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format
|
|
5425
5428
|
*/
|
|
5426
|
-
function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions):
|
|
5429
|
+
function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode;
|
|
5427
5430
|
/**
|
|
5428
5431
|
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
|
5429
5432
|
* that represent a compilation unit.
|
|
@@ -5494,10 +5497,6 @@ declare namespace ts {
|
|
|
5494
5497
|
affected: SourceFile | Program;
|
|
5495
5498
|
} | undefined;
|
|
5496
5499
|
interface BuilderProgramHost {
|
|
5497
|
-
/**
|
|
5498
|
-
* return true if file names are treated with case sensitivity
|
|
5499
|
-
*/
|
|
5500
|
-
useCaseSensitiveFileNames(): boolean;
|
|
5501
5500
|
/**
|
|
5502
5501
|
* If provided this would be used this hash instead of actual file shape text for detecting changes
|
|
5503
5502
|
*/
|
|
@@ -5681,7 +5680,7 @@ declare namespace ts {
|
|
|
5681
5680
|
/** If provided, used to resolve the module names, otherwise typescript's default module resolution */
|
|
5682
5681
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
|
|
5683
5682
|
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
|
|
5684
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
5683
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5685
5684
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
5686
5685
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
5687
5686
|
/**
|
|
@@ -5987,8 +5986,8 @@ declare namespace ts {
|
|
|
5987
5986
|
fileExists(path: string): boolean;
|
|
5988
5987
|
getTypeRootsVersion?(): number;
|
|
5989
5988
|
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
|
|
5990
|
-
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?:
|
|
5991
|
-
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?:
|
|
5989
|
+
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
5990
|
+
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
|
|
5992
5991
|
getDirectories?(directoryName: string): string[];
|
|
5993
5992
|
/**
|
|
5994
5993
|
* Gets a set of custom transformers to use during emit.
|
|
@@ -7119,11 +7118,11 @@ declare namespace ts {
|
|
|
7119
7118
|
* @param scriptKind The script kind of the file to be released
|
|
7120
7119
|
* @param impliedNodeFormat The implied source file format of the file to be released
|
|
7121
7120
|
*/
|
|
7122
|
-
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat:
|
|
7121
|
+
releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
|
|
7123
7122
|
/**
|
|
7124
7123
|
* @deprecated pass scriptKind for and impliedNodeFormat correctness */
|
|
7125
7124
|
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void;
|
|
7126
|
-
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat:
|
|
7125
|
+
releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
|
|
7127
7126
|
reportStats(): string;
|
|
7128
7127
|
}
|
|
7129
7128
|
type DocumentRegistryBucketKey = string & {
|