typescript 5.0.0-dev.20221204 → 5.0.0-dev.20221206
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 +421 -299
- package/lib/tsserver.js +468 -322
- package/lib/tsserverlibrary.d.ts +27 -18
- package/lib/tsserverlibrary.js +469 -323
- package/lib/typescript.d.ts +27 -15
- package/lib/typescript.js +448 -306
- package/lib/typingsInstaller.js +20 -8
- package/package.json +1 -1
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -3183,10 +3183,7 @@ declare namespace ts {
|
|
|
3183
3183
|
readFile(fileName: string): string | undefined;
|
|
3184
3184
|
writeFile(fileName: string, content: string): void;
|
|
3185
3185
|
fileExists(file: string): boolean;
|
|
3186
|
-
resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames?: string[], redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModuleFull | undefined)[];
|
|
3187
3186
|
getModuleResolutionCache(): ModuleResolutionCache | undefined;
|
|
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
3187
|
directoryExists(path: string): boolean;
|
|
3191
3188
|
getDirectories(path: string): string[];
|
|
3192
3189
|
log(s: string): void;
|
|
@@ -7318,14 +7315,7 @@ declare namespace ts {
|
|
|
7318
7315
|
}
|
|
7319
7316
|
interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
|
|
7320
7317
|
readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
|
|
7321
|
-
readonly failedLookupLocations: string[];
|
|
7322
7318
|
}
|
|
7323
|
-
interface ResolutionInfo<T> {
|
|
7324
|
-
names: readonly T[];
|
|
7325
|
-
reusedNames: readonly T[] | undefined;
|
|
7326
|
-
}
|
|
7327
|
-
type ModuleResolutionInfo = ResolutionInfo<StringLiteralLike>;
|
|
7328
|
-
type TypeReferenceDirectiveResolutionInfo = ResolutionInfo<string | FileReference>;
|
|
7329
7319
|
interface CompilerHost extends ModuleResolutionHost {
|
|
7330
7320
|
getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
7331
7321
|
getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
|
|
@@ -7338,15 +7328,20 @@ declare namespace ts {
|
|
|
7338
7328
|
useCaseSensitiveFileNames(): boolean;
|
|
7339
7329
|
getNewLine(): string;
|
|
7340
7330
|
readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
|
|
7341
|
-
|
|
7331
|
+
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
|
|
7332
|
+
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
7342
7333
|
/**
|
|
7343
7334
|
* Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
|
|
7344
7335
|
*/
|
|
7345
7336
|
getModuleResolutionCache?(): ModuleResolutionCache | undefined;
|
|
7346
7337
|
/**
|
|
7338
|
+
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
|
|
7339
|
+
*
|
|
7347
7340
|
* This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
|
|
7348
7341
|
*/
|
|
7349
|
-
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode
|
|
7342
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
|
|
7343
|
+
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
|
|
7344
|
+
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
|
|
7350
7345
|
getEnvironmentVariable?(name: string): string | undefined;
|
|
7351
7346
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
7352
7347
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
@@ -9614,10 +9609,20 @@ declare namespace ts {
|
|
|
9614
9609
|
trace?(s: string): void;
|
|
9615
9610
|
/** If provided is used to get the environment variable */
|
|
9616
9611
|
getEnvironmentVariable?(name: string): string | undefined;
|
|
9617
|
-
/**
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9612
|
+
/**
|
|
9613
|
+
* @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext
|
|
9614
|
+
*
|
|
9615
|
+
* If provided, used to resolve the module names, otherwise typescript's default module resolution
|
|
9616
|
+
*/
|
|
9617
|
+
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
9618
|
+
/**
|
|
9619
|
+
* @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext
|
|
9620
|
+
*
|
|
9621
|
+
* If provided, used to resolve type reference directives, otherwise typescript's default resolution
|
|
9622
|
+
*/
|
|
9623
|
+
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
|
|
9624
|
+
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
|
|
9625
|
+
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
|
|
9621
9626
|
/** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
|
|
9622
9627
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
9623
9628
|
/**
|
|
@@ -9849,9 +9854,13 @@ declare namespace ts {
|
|
|
9849
9854
|
readFile(path: string, encoding?: string): string | undefined;
|
|
9850
9855
|
fileExists(path: string): boolean;
|
|
9851
9856
|
getTypeRootsVersion?(): number;
|
|
9852
|
-
|
|
9857
|
+
/** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */
|
|
9858
|
+
resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[];
|
|
9853
9859
|
getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
9854
|
-
|
|
9860
|
+
/** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */
|
|
9861
|
+
resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[];
|
|
9862
|
+
resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[];
|
|
9863
|
+
resolveTypeReferenceDirectiveReferences?<T extends FileReference | string>(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[];
|
|
9855
9864
|
getDirectories?(directoryName: string): string[];
|
|
9856
9865
|
/**
|
|
9857
9866
|
* Gets a set of custom transformers to use during emit.
|