@typescript-deploys/pr-build 6.0.0-pr-62111-9 → 6.0.0-pr-62418-21

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/typescript.js CHANGED
@@ -672,6 +672,7 @@ __export(typescript_exports, {
672
672
  getCommonSourceDirectory: () => getCommonSourceDirectory,
673
673
  getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
674
674
  getCompilerOptionValue: () => getCompilerOptionValue,
675
+ getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
675
676
  getConditions: () => getConditions,
676
677
  getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
677
678
  getConstantValue: () => getConstantValue,
@@ -2286,7 +2287,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2287
 
2287
2288
  // src/compiler/corePublic.ts
2288
2289
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-insiders.20250926`;
2290
+ var version = `${versionMajorMinor}.0-insiders.20251003`;
2290
2291
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2292
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2293
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10334,6 +10335,7 @@ var Diagnostics = {
10334
10335
  The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
10335
10336
  Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
10336
10337
  File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
10338
+ The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
10337
10339
  Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
10338
10340
  Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
10339
10341
  Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
@@ -10397,6 +10399,7 @@ var Diagnostics = {
10397
10399
  Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
10398
10400
  Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
10399
10401
  Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
10402
+ Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information: diag(5111, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111", "Visit https://aka.ms/ts6 for migration information."),
10400
10403
  Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
10401
10404
  Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
10402
10405
  Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
@@ -17108,6 +17111,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
17108
17111
  "toSorted",
17109
17112
  "toSpliced",
17110
17113
  "with"
17114
+ ],
17115
+ esnext: [
17116
+ "toBase64",
17117
+ "setFromBase64",
17118
+ "toHex",
17119
+ "setFromHex"
17111
17120
  ]
17112
17121
  })),
17113
17122
  Uint8ClampedArray: new Map(Object.entries({
@@ -17236,6 +17245,12 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
17236
17245
  es2022: [
17237
17246
  "cause"
17238
17247
  ]
17248
+ })),
17249
+ Uint8ArrayConstructor: new Map(Object.entries({
17250
+ esnext: [
17251
+ "fromBase64",
17252
+ "fromHex"
17253
+ ]
17239
17254
  }))
17240
17255
  }))
17241
17256
  );
@@ -20397,7 +20412,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
20397
20412
  if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
20398
20413
  if (options.outFile) return true;
20399
20414
  if (!options.outDir) return false;
20400
- if (options.rootDir || options.composite && options.configFilePath) {
20415
+ if (options.rootDir || options.configFilePath) {
20401
20416
  const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
20402
20417
  const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
20403
20418
  if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
@@ -40723,6 +40738,7 @@ var libEntries = [
40723
40738
  ["esnext.iterator", "lib.esnext.iterator.d.ts"],
40724
40739
  ["esnext.promise", "lib.esnext.promise.d.ts"],
40725
40740
  ["esnext.float16", "lib.esnext.float16.d.ts"],
40741
+ ["esnext.typedarrays", "lib.esnext.typedarrays.d.ts"],
40726
40742
  ["esnext.error", "lib.esnext.error.d.ts"],
40727
40743
  ["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
40728
40744
  ["decorators", "lib.decorators.d.ts"],
@@ -46212,7 +46228,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
46212
46228
  if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
46213
46229
  const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
46214
46230
  const commonSourceDirGuesses = [];
46215
- if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
46231
+ if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
46216
46232
  const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
46217
46233
  commonSourceDirGuesses.push(commonDir);
46218
46234
  } else if (state.requestContainingDirectory) {
@@ -71395,13 +71411,10 @@ function createTypeChecker(host) {
71395
71411
  if (isObjectLiteralType2(target2)) {
71396
71412
  for (const sourceProp of excludeProperties(getPropertiesOfType(source2), excludedProperties)) {
71397
71413
  if (!getPropertyOfObjectType(target2, sourceProp.escapedName)) {
71398
- const sourceType = getTypeOfSymbol(sourceProp);
71399
- if (!(sourceType.flags & 32768 /* Undefined */)) {
71400
- if (reportErrors2) {
71401
- reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
71402
- }
71403
- return 0 /* False */;
71414
+ if (reportErrors2) {
71415
+ reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2));
71404
71416
  }
71417
+ return 0 /* False */;
71405
71418
  }
71406
71419
  }
71407
71420
  }
@@ -72065,7 +72078,7 @@ function createTypeChecker(host) {
72065
72078
  if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) {
72066
72079
  return 0 /* False */;
72067
72080
  }
72068
- return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
72081
+ return compareTypes(getNonMissingTypeOfSymbol(sourceProp), getNonMissingTypeOfSymbol(targetProp));
72069
72082
  }
72070
72083
  function isMatchingSignature(source, target, partialMatch) {
72071
72084
  const sourceParameterCount = getParameterCount(source);
@@ -74079,23 +74092,21 @@ function createTypeChecker(host) {
74079
74092
  for (const type of types) {
74080
74093
  if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
74081
74094
  const discriminant = getTypeOfPropertyOfType(type, name);
74082
- if (discriminant) {
74083
- if (!isLiteralType(discriminant)) {
74084
- return void 0;
74085
- }
74086
- let duplicate = false;
74087
- forEachType(discriminant, (t) => {
74088
- const id = getTypeId(getRegularTypeOfLiteralType(t));
74089
- const existing = map2.get(id);
74090
- if (!existing) {
74091
- map2.set(id, type);
74092
- } else if (existing !== unknownType) {
74093
- map2.set(id, unknownType);
74094
- duplicate = true;
74095
- }
74096
- });
74097
- if (!duplicate) count++;
74095
+ if (!discriminant || !isLiteralType(discriminant)) {
74096
+ return void 0;
74098
74097
  }
74098
+ let duplicate = false;
74099
+ forEachType(discriminant, (t) => {
74100
+ const id = getTypeId(getRegularTypeOfLiteralType(t));
74101
+ const existing = map2.get(id);
74102
+ if (!existing) {
74103
+ map2.set(id, type);
74104
+ } else if (existing !== unknownType) {
74105
+ map2.set(id, unknownType);
74106
+ duplicate = true;
74107
+ }
74108
+ });
74109
+ if (!duplicate) count++;
74099
74110
  }
74100
74111
  }
74101
74112
  return count >= 10 && count * 2 >= types.length ? map2 : void 0;
@@ -86212,6 +86223,47 @@ function createTypeChecker(host) {
86212
86223
  }
86213
86224
  return void 0;
86214
86225
  }
86226
+ function getUninstantiatedSignatures(node) {
86227
+ switch (node.kind) {
86228
+ case 214 /* CallExpression */:
86229
+ case 171 /* Decorator */:
86230
+ return getSignaturesOfType(
86231
+ getTypeOfExpression(node.expression),
86232
+ 0 /* Call */
86233
+ );
86234
+ case 215 /* NewExpression */:
86235
+ return getSignaturesOfType(
86236
+ getTypeOfExpression(node.expression),
86237
+ 1 /* Construct */
86238
+ );
86239
+ case 286 /* JsxSelfClosingElement */:
86240
+ case 287 /* JsxOpeningElement */:
86241
+ if (isJsxIntrinsicTagName(node.tagName)) return [];
86242
+ return getSignaturesOfType(
86243
+ getTypeOfExpression(node.tagName),
86244
+ 0 /* Call */
86245
+ );
86246
+ case 216 /* TaggedTemplateExpression */:
86247
+ return getSignaturesOfType(
86248
+ getTypeOfExpression(node.tag),
86249
+ 0 /* Call */
86250
+ );
86251
+ case 227 /* BinaryExpression */:
86252
+ case 290 /* JsxOpeningFragment */:
86253
+ return [];
86254
+ }
86255
+ }
86256
+ function getTypeParameterConstraintForPositionAcrossSignatures(signatures, position) {
86257
+ const relevantTypeParameterConstraints = flatMap(signatures, (signature) => {
86258
+ var _a;
86259
+ const relevantTypeParameter = (_a = signature.typeParameters) == null ? void 0 : _a[position];
86260
+ if (relevantTypeParameter === void 0) return [];
86261
+ const relevantConstraint = getConstraintOfTypeParameter(relevantTypeParameter);
86262
+ if (relevantConstraint === void 0) return [];
86263
+ return [relevantConstraint];
86264
+ });
86265
+ return getUnionType(relevantTypeParameterConstraints);
86266
+ }
86215
86267
  function checkTypeReferenceNode(node) {
86216
86268
  checkGrammarTypeArguments(node, node.typeArguments);
86217
86269
  if (node.kind === 184 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
@@ -86247,12 +86299,48 @@ function createTypeChecker(host) {
86247
86299
  }
86248
86300
  }
86249
86301
  function getTypeArgumentConstraint(node) {
86250
- const typeReferenceNode = tryCast(node.parent, isTypeReferenceType);
86251
- if (!typeReferenceNode) return void 0;
86252
- const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReferenceNode);
86253
- if (!typeParameters) return void 0;
86254
- const constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
86255
- return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments2(typeReferenceNode, typeParameters)));
86302
+ let typeArgumentPosition;
86303
+ if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
86304
+ typeArgumentPosition = node.parent.typeArguments.indexOf(node);
86305
+ }
86306
+ if (typeArgumentPosition !== void 0) {
86307
+ if (isCallLikeExpression(node.parent)) {
86308
+ return getTypeParameterConstraintForPositionAcrossSignatures(
86309
+ getUninstantiatedSignatures(node.parent),
86310
+ typeArgumentPosition
86311
+ );
86312
+ }
86313
+ if (isDecorator(node.parent.parent)) {
86314
+ return getTypeParameterConstraintForPositionAcrossSignatures(
86315
+ getUninstantiatedSignatures(node.parent.parent),
86316
+ typeArgumentPosition
86317
+ );
86318
+ }
86319
+ if (isExpressionWithTypeArguments(node.parent) && isExpressionStatement(node.parent.parent)) {
86320
+ const uninstantiatedType = checkExpression(node.parent.expression);
86321
+ const callConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
86322
+ getSignaturesOfType(uninstantiatedType, 0 /* Call */),
86323
+ typeArgumentPosition
86324
+ );
86325
+ const constructConstraint = getTypeParameterConstraintForPositionAcrossSignatures(
86326
+ getSignaturesOfType(uninstantiatedType, 1 /* Construct */),
86327
+ typeArgumentPosition
86328
+ );
86329
+ if (constructConstraint.flags & 131072 /* Never */) return callConstraint;
86330
+ if (callConstraint.flags & 131072 /* Never */) return constructConstraint;
86331
+ return getIntersectionType([callConstraint, constructConstraint]);
86332
+ }
86333
+ if (isTypeReferenceType(node.parent)) {
86334
+ const typeParameters = getTypeParametersForTypeReferenceOrImport(node.parent);
86335
+ if (!typeParameters) return void 0;
86336
+ const relevantTypeParameter = typeParameters[typeArgumentPosition];
86337
+ const constraint = getConstraintOfTypeParameter(relevantTypeParameter);
86338
+ return constraint && instantiateType(
86339
+ constraint,
86340
+ createTypeMapper(typeParameters, getEffectiveTypeArguments2(node.parent, typeParameters))
86341
+ );
86342
+ }
86343
+ }
86256
86344
  }
86257
86345
  function checkTypeQuery(node) {
86258
86346
  getTypeFromTypeQueryNode(node);
@@ -120721,7 +120809,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
120721
120809
  if (options.rootDir) {
120722
120810
  commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
120723
120811
  checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
120724
- } else if (options.composite && options.configFilePath) {
120812
+ } else if (options.configFilePath) {
120725
120813
  commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
120726
120814
  checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
120727
120815
  } else {
@@ -120732,6 +120820,13 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
120732
120820
  }
120733
120821
  return commonSourceDirectory;
120734
120822
  }
120823
+ function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
120824
+ let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
120825
+ if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
120826
+ commonSourceDirectory += directorySeparator;
120827
+ }
120828
+ return commonSourceDirectory;
120829
+ }
120735
120830
  function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
120736
120831
  return getCommonSourceDirectory(
120737
120832
  options,
@@ -129221,6 +129316,31 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129221
129316
  createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
129222
129317
  }
129223
129318
  }
129319
+ if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
129320
+ getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
129321
+ options.outFile)) {
129322
+ const dir = getCommonSourceDirectory2();
129323
+ const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
129324
+ const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
129325
+ if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
129326
+ createDiagnosticForOption(
129327
+ /*onKey*/
129328
+ true,
129329
+ options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
129330
+ !options.outFile && options.outDir ? "declarationDir" : void 0,
129331
+ chainDiagnosticMessages(
129332
+ chainDiagnosticMessages(
129333
+ /*details*/
129334
+ void 0,
129335
+ Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
129336
+ ),
129337
+ Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
129338
+ getBaseFileName(options.configFilePath),
129339
+ getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
129340
+ )
129341
+ );
129342
+ }
129343
+ }
129224
129344
  if (options.checkJs && !getAllowJSCompilerOption(options)) {
129225
129345
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
129226
129346
  }
@@ -129348,32 +129468,35 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129348
129468
  const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
129349
129469
  const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */;
129350
129470
  if (mustBeRemoved || canBeSilenced) {
129351
- fn((name, value, useInstead) => {
129471
+ fn((name, value, useInstead, related) => {
129352
129472
  if (mustBeRemoved) {
129353
129473
  if (value === void 0) {
129354
- createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
129474
+ createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
129355
129475
  } else {
129356
- createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
129476
+ createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
129357
129477
  }
129358
129478
  } else {
129359
129479
  if (value === void 0) {
129360
- createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);
129480
+ createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);
129361
129481
  } else {
129362
- createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);
129482
+ createDiagnostic(name, value, useInstead, related, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);
129363
129483
  }
129364
129484
  }
129365
129485
  });
129366
129486
  }
129367
129487
  }
129368
129488
  function verifyDeprecatedCompilerOptions() {
129369
- function createDiagnostic(name, value, useInstead, message, ...args) {
129489
+ function createDiagnostic(name, value, useInstead, related, message, ...args) {
129370
129490
  if (useInstead) {
129371
- const details = chainDiagnosticMessages(
129491
+ let details = chainDiagnosticMessages(
129372
129492
  /*details*/
129373
129493
  void 0,
129374
129494
  Diagnostics.Use_0_instead,
129375
129495
  useInstead
129376
129496
  );
129497
+ if (related) {
129498
+ details = chainDiagnosticMessages(details, related);
129499
+ }
129377
129500
  const chain = chainDiagnosticMessages(details, message, ...args);
129378
129501
  createDiagnosticForOption(
129379
129502
  /*onKey*/
@@ -129384,14 +129507,22 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129384
129507
  chain
129385
129508
  );
129386
129509
  } else {
129510
+ let details;
129511
+ if (related) {
129512
+ details = chainDiagnosticMessages(
129513
+ /*details*/
129514
+ void 0,
129515
+ related
129516
+ );
129517
+ }
129518
+ const chain = chainDiagnosticMessages(details, message, ...args);
129387
129519
  createDiagnosticForOption(
129388
129520
  /*onKey*/
129389
129521
  !value,
129390
129522
  name,
129391
129523
  /*option2*/
129392
129524
  void 0,
129393
- message,
129394
- ...args
129525
+ chain
129395
129526
  );
129396
129527
  }
129397
129528
  }
@@ -129444,12 +129575,28 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129444
129575
  });
129445
129576
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
129446
129577
  if (options.moduleResolution === 2 /* Node10 */) {
129447
- createDeprecatedDiagnostic("moduleResolution", "node10");
129578
+ createDeprecatedDiagnostic(
129579
+ "moduleResolution",
129580
+ "node10",
129581
+ /*useInstead*/
129582
+ void 0,
129583
+ Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
129584
+ );
129585
+ }
129586
+ if (options.baseUrl !== void 0) {
129587
+ createDeprecatedDiagnostic(
129588
+ "baseUrl",
129589
+ /*value*/
129590
+ void 0,
129591
+ /*useInstead*/
129592
+ void 0,
129593
+ Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
129594
+ );
129448
129595
  }
129449
129596
  });
129450
129597
  }
129451
129598
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
129452
- function createDiagnostic(_name, _value, _useInstead, message, ...args) {
129599
+ function createDiagnostic(_name, _value, _useInstead, _related, message, ...args) {
129453
129600
  createDiagnosticForReference(parentFile, index, message, ...args);
129454
129601
  }
129455
129602
  checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
@@ -166701,6 +166848,7 @@ __export(ts_Completions_exports, {
166701
166848
  getCompletionEntryDetails: () => getCompletionEntryDetails,
166702
166849
  getCompletionEntrySymbol: () => getCompletionEntrySymbol,
166703
166850
  getCompletionsAtPosition: () => getCompletionsAtPosition,
166851
+ getConstraintOfTypeArgumentProperty: () => getConstraintOfTypeArgumentProperty,
166704
166852
  getDefaultCommitCharacters: () => getDefaultCommitCharacters,
166705
166853
  getPropertiesForObjectExpression: () => getPropertiesForObjectExpression,
166706
166854
  moduleSpecifierResolutionCacheAttemptLimit: () => moduleSpecifierResolutionCacheAttemptLimit,
@@ -169025,13 +169173,13 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
169025
169173
  }
169026
169174
  }
169027
169175
  log("getCompletionData: Semantic work: " + (timestamp() - semanticStart));
169028
- const contextualType = previousToken && getContextualType(previousToken, position, sourceFile, typeChecker);
169176
+ const contextualTypeOrConstraint = previousToken && (getContextualType(previousToken, position, sourceFile, typeChecker) ?? getConstraintOfTypeArgumentProperty(previousToken, typeChecker));
169029
169177
  const isLiteralExpected = !tryCast(previousToken, isStringLiteralLike) && !isJsxIdentifierExpected;
169030
169178
  const literals = !isLiteralExpected ? [] : mapDefined(
169031
- contextualType && (contextualType.isUnion() ? contextualType.types : [contextualType]),
169179
+ contextualTypeOrConstraint && (contextualTypeOrConstraint.isUnion() ? contextualTypeOrConstraint.types : [contextualTypeOrConstraint]),
169032
169180
  (t) => t.isLiteral() && !(t.flags & 1024 /* EnumLiteral */) ? t.value : void 0
169033
169181
  );
169034
- const recommendedCompletion = previousToken && contextualType && getRecommendedCompletion(previousToken, contextualType, typeChecker);
169182
+ const recommendedCompletion = previousToken && contextualTypeOrConstraint && getRecommendedCompletion(previousToken, contextualTypeOrConstraint, typeChecker);
169035
169183
  return {
169036
169184
  kind: 0 /* Data */,
169037
169185
  symbols,
@@ -170537,18 +170685,26 @@ function tryGetTypeLiteralNode(node) {
170537
170685
  }
170538
170686
  function getConstraintOfTypeArgumentProperty(node, checker) {
170539
170687
  if (!node) return void 0;
170540
- if (isTypeNode(node) && isTypeReferenceType(node.parent)) {
170541
- return checker.getTypeArgumentConstraint(node);
170688
+ if (isTypeNode(node)) {
170689
+ const constraint = checker.getTypeArgumentConstraint(node);
170690
+ if (constraint) return constraint;
170542
170691
  }
170543
170692
  const t = getConstraintOfTypeArgumentProperty(node.parent, checker);
170544
170693
  if (!t) return void 0;
170545
170694
  switch (node.kind) {
170546
170695
  case 172 /* PropertySignature */:
170547
170696
  return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName);
170697
+ case 59 /* ColonToken */:
170698
+ if (node.parent.kind === 172 /* PropertySignature */) {
170699
+ return t;
170700
+ }
170701
+ break;
170548
170702
  case 194 /* IntersectionType */:
170549
170703
  case 188 /* TypeLiteral */:
170550
170704
  case 193 /* UnionType */:
170551
170705
  return t;
170706
+ case 23 /* OpenBracketToken */:
170707
+ return checker.getElementTypeOfArrayType(t);
170552
170708
  }
170553
170709
  }
170554
170710
  function isFromObjectTypeDeclaration(node) {
@@ -171070,7 +171226,12 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program,
171070
171226
  }
171071
171227
  function fromUnionableLiteralType(grandParent) {
171072
171228
  switch (grandParent.kind) {
171229
+ case 214 /* CallExpression */:
171073
171230
  case 234 /* ExpressionWithTypeArguments */:
171231
+ case 287 /* JsxOpeningElement */:
171232
+ case 286 /* JsxSelfClosingElement */:
171233
+ case 215 /* NewExpression */:
171234
+ case 216 /* TaggedTemplateExpression */:
171074
171235
  case 184 /* TypeReference */: {
171075
171236
  const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
171076
171237
  if (typeArgument) {
@@ -171084,6 +171245,8 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, program,
171084
171245
  return void 0;
171085
171246
  }
171086
171247
  return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
171248
+ case 172 /* PropertySignature */:
171249
+ return { kind: 2 /* Types */, types: getStringLiteralTypes(getConstraintOfTypeArgumentProperty(grandParent, typeChecker)), isNewIdentifier: false };
171087
171250
  case 193 /* UnionType */: {
171088
171251
  const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));
171089
171252
  if (!result) {
@@ -183877,6 +184040,7 @@ __export(ts_exports2, {
183877
184040
  getCommonSourceDirectory: () => getCommonSourceDirectory,
183878
184041
  getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
183879
184042
  getCompilerOptionValue: () => getCompilerOptionValue,
184043
+ getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
183880
184044
  getConditions: () => getConditions,
183881
184045
  getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
183882
184046
  getConstantValue: () => getConstantValue,
@@ -198639,6 +198803,7 @@ if (typeof console !== "undefined") {
198639
198803
  getCommonSourceDirectory,
198640
198804
  getCommonSourceDirectoryOfConfig,
198641
198805
  getCompilerOptionValue,
198806
+ getComputedCommonSourceDirectory,
198642
198807
  getConditions,
198643
198808
  getConfigFileParsingDiagnostics,
198644
198809
  getConstantValue,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "6.0.0-pr-62111-9",
5
+ "version": "6.0.0-pr-62418-21",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [