@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.
@@ -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?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
3189
- resolveTypeReferenceDirectives(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference?: ResolvedProjectReference, _options?: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | 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
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?: SourceFile["impliedNodeFormat"];
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?: ModuleKind.ESNext | ModuleKind.CommonJS;
6083
+ impliedNodeFormat?: ResolutionMode;
6083
6084
  }
6084
6085
  interface SourceFile {
6085
6086
  getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
@@ -6718,6 +6719,7 @@ declare namespace ts {
6718
6719
  interface EnumType extends Type {
6719
6720
  }
6720
6721
  enum ObjectFlags {
6722
+ None = 0,
6721
6723
  Class = 1,
6722
6724
  Interface = 2,
6723
6725
  Reference = 4,
@@ -6888,6 +6890,7 @@ declare namespace ts {
6888
6890
  declaration?: IndexSignatureDeclaration;
6889
6891
  }
6890
6892
  enum InferencePriority {
6893
+ None = 0,
6891
6894
  NakedTypeVariable = 1,
6892
6895
  SpeculativeTuple = 2,
6893
6896
  SubstituteSource = 4,
@@ -7343,7 +7346,7 @@ declare namespace ts {
7343
7346
  /**
7344
7347
  * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
7345
7348
  */
7346
- resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
7349
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
7347
7350
  getEnvironmentVariable?(name: string): string | undefined;
7348
7351
  /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
7349
7352
  hasInvalidatedResolutions?(filePath: Path): boolean;
@@ -9073,7 +9076,7 @@ declare namespace ts {
9073
9076
  * and files on disk, but needs to be done with a module resolution cache in scope to be performant.
9074
9077
  * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
9075
9078
  */
9076
- impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
9079
+ impliedNodeFormat?: ResolutionMode;
9077
9080
  /**
9078
9081
  * Controls how module-y-ness is set for the given file. Usually the result of calling
9079
9082
  * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default
@@ -9172,7 +9175,7 @@ declare namespace ts {
9172
9175
  * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
9173
9176
  * is assumed to be the same as root directory of the project.
9174
9177
  */
9175
- function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: SourceFile["impliedNodeFormat"]): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
9178
+ function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: ResolutionMode): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
9176
9179
  /**
9177
9180
  * Given a set of options, returns the set of type directive names
9178
9181
  * that should be included for this program automatically.
@@ -9184,18 +9187,18 @@ declare namespace ts {
9184
9187
  function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
9185
9188
  function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
9186
9189
  function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
9187
- function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
9188
- function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations;
9190
+ function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
9191
+ function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
9189
9192
  function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
9190
9193
  function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
9191
9194
  interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
9192
9195
  }
9193
9196
  interface ModeAwareCache<T> {
9194
- get(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): T | undefined;
9195
- set(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, value: T): this;
9196
- delete(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): this;
9197
- has(key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined): boolean;
9198
- forEach(cb: (elem: T, key: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined) => void): void;
9197
+ get(key: string, mode: ResolutionMode): T | undefined;
9198
+ set(key: string, mode: ResolutionMode, value: T): this;
9199
+ delete(key: string, mode: ResolutionMode): this;
9200
+ has(key: string, mode: ResolutionMode): boolean;
9201
+ forEach(cb: (elem: T, key: string, mode: ResolutionMode) => void): void;
9199
9202
  size(): number;
9200
9203
  }
9201
9204
  /**
@@ -9219,7 +9222,7 @@ declare namespace ts {
9219
9222
  * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
9220
9223
  */
9221
9224
  interface NonRelativeModuleNameResolutionCache extends PackageJsonInfoCache {
9222
- getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ModuleKind.CommonJS | ModuleKind.ESNext | undefined, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
9225
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
9223
9226
  }
9224
9227
  interface PackageJsonInfoCache {
9225
9228
  clear(): void;
@@ -9327,7 +9330,7 @@ declare namespace ts {
9327
9330
  * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
9328
9331
  * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
9329
9332
  */
9330
- function getModeForFileReference(ref: FileReference | string, containingFileMode: SourceFile["impliedNodeFormat"]): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined;
9333
+ function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ts.ResolutionMode;
9331
9334
  /**
9332
9335
  * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
9333
9336
  * 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 +9338,7 @@ declare namespace ts {
9335
9338
  * @param file File to fetch the resolution mode within
9336
9339
  * @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
9340
  */
9338
- function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
9341
+ function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode;
9339
9342
  /**
9340
9343
  * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
9341
9344
  * 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 +9349,7 @@ declare namespace ts {
9346
9349
  * @returns The final resolution mode of the import
9347
9350
  */
9348
9351
  function getModeForUsageLocation(file: {
9349
- impliedNodeFormat?: SourceFile["impliedNodeFormat"];
9352
+ impliedNodeFormat?: ResolutionMode;
9350
9353
  }, usage: StringLiteralLike): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined;
9351
9354
  function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
9352
9355
  /**
@@ -9359,7 +9362,7 @@ declare namespace ts {
9359
9362
  * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution`
9360
9363
  * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format
9361
9364
  */
9362
- function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
9365
+ function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode;
9363
9366
  /**
9364
9367
  * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
9365
9368
  * that represent a compilation unit.
@@ -9430,10 +9433,6 @@ declare namespace ts {
9430
9433
  affected: SourceFile | Program;
9431
9434
  } | undefined;
9432
9435
  interface BuilderProgramHost {
9433
- /**
9434
- * return true if file names are treated with case sensitivity
9435
- */
9436
- useCaseSensitiveFileNames(): boolean;
9437
9436
  /**
9438
9437
  * If provided this would be used this hash instead of actual file shape text for detecting changes
9439
9438
  */
@@ -9617,7 +9616,7 @@ declare namespace ts {
9617
9616
  /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
9618
9617
  resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile, resolutionInfo?: ModuleResolutionInfo): (ResolvedModule | undefined)[];
9619
9618
  /** 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?: SourceFile["impliedNodeFormat"] | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
9619
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
9621
9620
  /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */
9622
9621
  hasInvalidatedResolutions?(filePath: Path): boolean;
9623
9622
  /**
@@ -9850,8 +9849,8 @@ declare namespace ts {
9850
9849
  fileExists(path: string): boolean;
9851
9850
  getTypeRootsVersion?(): number;
9852
9851
  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?: ModuleKind.CommonJS | ModuleKind.ESNext): ResolvedModuleWithFailedLookupLocations | undefined;
9854
- resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: SourceFile["impliedNodeFormat"] | undefined, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
9852
+ getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
9853
+ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode, resolutionInfo?: TypeReferenceDirectiveResolutionInfo): (ResolvedTypeReferenceDirective | undefined)[];
9855
9854
  getDirectories?(directoryName: string): string[];
9856
9855
  /**
9857
9856
  * Gets a set of custom transformers to use during emit.
@@ -10982,11 +10981,11 @@ declare namespace ts {
10982
10981
  * @param scriptKind The script kind of the file to be released
10983
10982
  * @param impliedNodeFormat The implied source file format of the file to be released
10984
10983
  */
10985
- releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void;
10984
+ releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
10986
10985
  /**
10987
10986
  * @deprecated pass scriptKind for and impliedNodeFormat correctness */
10988
10987
  releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void;
10989
- releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: SourceFile["impliedNodeFormat"]): void;
10988
+ releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void;
10990
10989
  reportStats(): string;
10991
10990
  }
10992
10991
  type DocumentRegistryBucketKey = string & {