@typescript-deploys/pr-build 5.5.0-pr-58333-2 → 5.5.0-pr-58337-27

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.
Files changed (3) hide show
  1. package/lib/tsc.js +125 -41
  2. package/lib/typescript.js +137 -41
  3. package/package.json +1 -1
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240426`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240427`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -447,13 +447,23 @@ function deduplicateSorted(array, comparer) {
447
447
  }
448
448
  return deduplicated;
449
449
  }
450
- function insertSorted(array, insert, compare, allowDuplicates) {
450
+ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {
451
451
  if (array.length === 0) {
452
452
  array.push(insert);
453
453
  return true;
454
454
  }
455
455
  const insertIndex = binarySearch(array, insert, identity, compare);
456
456
  if (insertIndex < 0) {
457
+ if (equalityComparer && !allowDuplicates) {
458
+ const idx = ~insertIndex;
459
+ if (idx > 0 && equalityComparer(insert, array[idx - 1])) {
460
+ return false;
461
+ }
462
+ if (idx < array.length && equalityComparer(insert, array[idx])) {
463
+ array.splice(idx, 1, insert);
464
+ return true;
465
+ }
466
+ }
457
467
  array.splice(~insertIndex, 0, insert);
458
468
  return true;
459
469
  }
@@ -7457,6 +7467,7 @@ var Diagnostics = {
7457
7467
  Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."),
7458
7468
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
7459
7469
  Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
7470
+ Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."),
7460
7471
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
7461
7472
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7462
7473
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -11072,7 +11083,7 @@ function isExternalModuleNameRelative(moduleName) {
11072
11083
  return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);
11073
11084
  }
11074
11085
  function sortAndDeduplicateDiagnostics(diagnostics) {
11075
- return sortAndDeduplicate(diagnostics, compareDiagnostics);
11086
+ return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);
11076
11087
  }
11077
11088
  function getDefaultLibFileName(options) {
11078
11089
  switch (getEmitScriptTarget(options)) {
@@ -15749,6 +15760,9 @@ function createDiagnosticCollection() {
15749
15760
  if (result >= 0) {
15750
15761
  return diagnostics[result];
15751
15762
  }
15763
+ if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {
15764
+ return diagnostics[~result - 1];
15765
+ }
15752
15766
  return void 0;
15753
15767
  }
15754
15768
  function add(diagnostic) {
@@ -15767,7 +15781,7 @@ function createDiagnosticCollection() {
15767
15781
  }
15768
15782
  diagnostics = nonFileDiagnostics;
15769
15783
  }
15770
- insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
15784
+ insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);
15771
15785
  }
15772
15786
  function getGlobalDiagnostics() {
15773
15787
  hasReadNonFileDiagnostics = true;
@@ -17373,7 +17387,7 @@ function compareRelatedInformation(d1, d2) {
17373
17387
  return 0 /* EqualTo */;
17374
17388
  }
17375
17389
  if (d1.relatedInformation && d2.relatedInformation) {
17376
- return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17390
+ return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17377
17391
  const d2i = d2.relatedInformation[index];
17378
17392
  return compareDiagnostics(d1i, d2i);
17379
17393
  }) || 0 /* EqualTo */;
@@ -17383,38 +17397,78 @@ function compareRelatedInformation(d1, d2) {
17383
17397
  function compareMessageText(t1, t2) {
17384
17398
  if (typeof t1 === "string" && typeof t2 === "string") {
17385
17399
  return compareStringsCaseSensitive(t1, t2);
17386
- } else if (typeof t1 === "string") {
17387
- return -1 /* LessThan */;
17388
- } else if (typeof t2 === "string") {
17389
- return 1 /* GreaterThan */;
17390
17400
  }
17391
- let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17401
+ if (typeof t1 === "string") {
17402
+ t1 = { messageText: t1 };
17403
+ }
17404
+ if (typeof t2 === "string") {
17405
+ t2 = { messageText: t2 };
17406
+ }
17407
+ const res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17392
17408
  if (res) {
17393
17409
  return res;
17394
17410
  }
17395
- if (!t1.next && !t2.next) {
17411
+ return compareMessageChain(t1.next, t2.next);
17412
+ }
17413
+ function compareMessageChain(c1, c2) {
17414
+ if (c1 === void 0 && c2 === void 0) {
17396
17415
  return 0 /* EqualTo */;
17397
17416
  }
17398
- if (!t1.next) {
17417
+ if (c1 === void 0) {
17418
+ return 1 /* GreaterThan */;
17419
+ }
17420
+ if (c2 === void 0) {
17399
17421
  return -1 /* LessThan */;
17400
17422
  }
17401
- if (!t2.next) {
17423
+ return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);
17424
+ }
17425
+ function compareMessageChainSize(c1, c2) {
17426
+ if (c1 === void 0 && c2 === void 0) {
17427
+ return 0 /* EqualTo */;
17428
+ }
17429
+ if (c1 === void 0) {
17402
17430
  return 1 /* GreaterThan */;
17403
17431
  }
17404
- const len = Math.min(t1.next.length, t2.next.length);
17405
- for (let i = 0; i < len; i++) {
17406
- res = compareMessageText(t1.next[i], t2.next[i]);
17432
+ if (c2 === void 0) {
17433
+ return -1 /* LessThan */;
17434
+ }
17435
+ let res = compareValues(c2.length, c1.length);
17436
+ if (res) {
17437
+ return res;
17438
+ }
17439
+ for (let i = 0; i < c2.length; i++) {
17440
+ res = compareMessageChainSize(c1[i].next, c2[i].next);
17407
17441
  if (res) {
17408
17442
  return res;
17409
17443
  }
17410
17444
  }
17411
- if (t1.next.length < t2.next.length) {
17412
- return -1 /* LessThan */;
17413
- } else if (t1.next.length > t2.next.length) {
17414
- return 1 /* GreaterThan */;
17445
+ return 0 /* EqualTo */;
17446
+ }
17447
+ function compareMessageChainContent(c1, c2) {
17448
+ let res;
17449
+ for (let i = 0; i < c2.length; i++) {
17450
+ res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);
17451
+ if (res) {
17452
+ return res;
17453
+ }
17454
+ if (c1[i].next === void 0) {
17455
+ continue;
17456
+ }
17457
+ res = compareMessageChainContent(c1[i].next, c2[i].next);
17458
+ if (res) {
17459
+ return res;
17460
+ }
17415
17461
  }
17416
17462
  return 0 /* EqualTo */;
17417
17463
  }
17464
+ function diagnosticsEqualityComparer(d1, d2) {
17465
+ return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(d1.code, d2.code) === 0 /* EqualTo */ && messageTextEqualityComparer(d1.messageText, d2.messageText);
17466
+ }
17467
+ function messageTextEqualityComparer(m1, m2) {
17468
+ const t1 = typeof m1 === "string" ? m1 : m1.messageText;
17469
+ const t2 = typeof m2 === "string" ? m2 : m2.messageText;
17470
+ return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;
17471
+ }
17418
17472
  function getLanguageVariant(scriptKind) {
17419
17473
  return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
17420
17474
  }
@@ -18282,7 +18336,7 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
18282
18336
  return { pos, end };
18283
18337
  }
18284
18338
  function skipTypeChecking(sourceFile, options, host) {
18285
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
18339
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
18286
18340
  }
18287
18341
  function isJsonEqual(a, b) {
18288
18342
  return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual);
@@ -36002,6 +36056,20 @@ var commandOptionsWithoutBuild = [
36002
36056
  defaultValueDescription: false,
36003
36057
  description: Diagnostics.Disable_emitting_comments
36004
36058
  },
36059
+ {
36060
+ name: "noCheck",
36061
+ type: "boolean",
36062
+ showInSimplifiedHelpView: false,
36063
+ category: Diagnostics.Compiler_Diagnostics,
36064
+ description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
36065
+ transpileOptionValue: void 0,
36066
+ defaultValueDescription: false,
36067
+ affectsSemanticDiagnostics: true,
36068
+ affectsBuildInfo: true,
36069
+ extraValidation() {
36070
+ return [Diagnostics.Unknown_compiler_option_0, "noCheck"];
36071
+ }
36072
+ },
36005
36073
  {
36006
36074
  name: "noEmit",
36007
36075
  type: "boolean",
@@ -37849,11 +37917,11 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis
37849
37917
  const excludeOfRaw = getSpecsFromRaw("exclude");
37850
37918
  let isDefaultIncludeSpec = false;
37851
37919
  let excludeSpecs = toPropValue(excludeOfRaw);
37852
- if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
37853
- const outDir = raw.compilerOptions.outDir;
37854
- const declarationDir = raw.compilerOptions.declarationDir;
37920
+ if (excludeOfRaw === "no-prop") {
37921
+ const outDir = options.outDir;
37922
+ const declarationDir = options.declarationDir;
37855
37923
  if (outDir || declarationDir) {
37856
- excludeSpecs = [outDir, declarationDir].filter((d) => !!d);
37924
+ excludeSpecs = filter([outDir, declarationDir], (d) => !!d);
37857
37925
  }
37858
37926
  }
37859
37927
  if (filesSpecs === void 0 && includeSpecs === void 0) {
@@ -52082,6 +52150,7 @@ function createTypeChecker(host) {
52082
52150
  }
52083
52151
  }
52084
52152
  function serializeSymbol(symbol, isPrivate, propertyAsAlias) {
52153
+ void getPropertiesOfType(getTypeOfSymbol(symbol));
52085
52154
  const visitedSym = getMergedSymbol(symbol);
52086
52155
  if (visitedSymbols.has(getSymbolId(visitedSym))) {
52087
52156
  return;
@@ -54705,7 +54774,7 @@ function createTypeChecker(host) {
54705
54774
  }
54706
54775
  type = anyType;
54707
54776
  }
54708
- links.type = type;
54777
+ links.type ?? (links.type = type);
54709
54778
  }
54710
54779
  return links.type;
54711
54780
  }
@@ -54723,7 +54792,7 @@ function createTypeChecker(host) {
54723
54792
  }
54724
54793
  writeType = anyType;
54725
54794
  }
54726
- links.writeType = writeType || getTypeOfAccessors(symbol);
54795
+ links.writeType ?? (links.writeType = writeType || getTypeOfAccessors(symbol));
54727
54796
  }
54728
54797
  return links.writeType;
54729
54798
  }
@@ -54800,10 +54869,10 @@ function createTypeChecker(host) {
54800
54869
  true
54801
54870
  );
54802
54871
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
54803
- links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
54872
+ links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType);
54804
54873
  if (!popTypeResolution()) {
54805
54874
  reportCircularityError(exportSymbol ?? symbol);
54806
- return links.type = errorType;
54875
+ return links.type ?? (links.type = errorType);
54807
54876
  }
54808
54877
  }
54809
54878
  return links.type;
@@ -55069,7 +55138,7 @@ function createTypeChecker(host) {
55069
55138
  }
55070
55139
  if (!popTypeResolution()) {
55071
55140
  error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
55072
- return type.resolvedBaseConstructorType = errorType;
55141
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
55073
55142
  }
55074
55143
  if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
55075
55144
  const err = error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
@@ -55086,9 +55155,9 @@ function createTypeChecker(host) {
55086
55155
  addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
55087
55156
  }
55088
55157
  }
55089
- return type.resolvedBaseConstructorType = errorType;
55158
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
55090
55159
  }
55091
- type.resolvedBaseConstructorType = baseConstructorType;
55160
+ type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = baseConstructorType);
55092
55161
  }
55093
55162
  return type.resolvedBaseConstructorType;
55094
55163
  }
@@ -55329,7 +55398,7 @@ function createTypeChecker(host) {
55329
55398
  error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
55330
55399
  }
55331
55400
  }
55332
- links.declaredType = type;
55401
+ links.declaredType ?? (links.declaredType = type);
55333
55402
  }
55334
55403
  return links.declaredType;
55335
55404
  }
@@ -56447,6 +56516,7 @@ function createTypeChecker(host) {
56447
56516
  }
56448
56517
  }
56449
56518
  function getTypeOfMappedSymbol(symbol) {
56519
+ var _a;
56450
56520
  if (!symbol.links.type) {
56451
56521
  const mappedType = symbol.links.mappedType;
56452
56522
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
@@ -56465,7 +56535,7 @@ function createTypeChecker(host) {
56465
56535
  error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
56466
56536
  type = errorType;
56467
56537
  }
56468
- symbol.links.type = type;
56538
+ (_a = symbol.links).type ?? (_a.type = type);
56469
56539
  }
56470
56540
  return symbol.links.type;
56471
56541
  }
@@ -56818,7 +56888,7 @@ function createTypeChecker(host) {
56818
56888
  }
56819
56889
  result = circularConstraintType;
56820
56890
  }
56821
- t.immediateBaseConstraint = result || noConstraintType;
56891
+ t.immediateBaseConstraint ?? (t.immediateBaseConstraint = result || noConstraintType);
56822
56892
  }
56823
56893
  return t.immediateBaseConstraint;
56824
56894
  }
@@ -57692,7 +57762,7 @@ function createTypeChecker(host) {
57692
57762
  }
57693
57763
  type = anyType;
57694
57764
  }
57695
- signature.resolvedReturnType = type;
57765
+ signature.resolvedReturnType ?? (signature.resolvedReturnType = type);
57696
57766
  }
57697
57767
  return signature.resolvedReturnType;
57698
57768
  }
@@ -58038,9 +58108,9 @@ function createTypeChecker(host) {
58038
58108
  const node = type.node;
58039
58109
  const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
58040
58110
  if (popTypeResolution()) {
58041
- type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
58111
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
58042
58112
  } else {
58043
- type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray;
58113
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray);
58044
58114
  error(
58045
58115
  type.node || currentNode,
58046
58116
  type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves,
@@ -69314,7 +69384,7 @@ function createTypeChecker(host) {
69314
69384
  reportCircularityError(declaration.symbol);
69315
69385
  return true;
69316
69386
  }
69317
- links.parameterInitializerContainsUndefined = containsUndefined;
69387
+ links.parameterInitializerContainsUndefined ?? (links.parameterInitializerContainsUndefined = containsUndefined);
69318
69388
  }
69319
69389
  return links.parameterInitializerContainsUndefined;
69320
69390
  }
@@ -74723,8 +74793,13 @@ function createTypeChecker(host) {
74723
74793
  if (cached && cached !== resolvingSignature && !candidatesOutArray) {
74724
74794
  return cached;
74725
74795
  }
74796
+ const saveResolutionStart = resolutionStart;
74797
+ if (!cached) {
74798
+ resolutionStart = resolutionTargets.length;
74799
+ }
74726
74800
  links.resolvedSignature = resolvingSignature;
74727
74801
  let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);
74802
+ resolutionStart = saveResolutionStart;
74728
74803
  if (result !== resolvingSignature) {
74729
74804
  if (links.resolvedSignature !== resolvingSignature) {
74730
74805
  result = links.resolvedSignature;
@@ -85328,6 +85403,7 @@ function createTypeChecker(host) {
85328
85403
  if (!sym) {
85329
85404
  return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker);
85330
85405
  }
85406
+ resolveExternalModuleSymbol(sym);
85331
85407
  return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
85332
85408
  },
85333
85409
  isImportRequiredByAugmentation
@@ -112895,7 +112971,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
112895
112971
  const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
112896
112972
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
112897
112973
  const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
112898
- if (emitOnly && !getEmitDeclarations(compilerOptions)) {
112974
+ if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck) {
112899
112975
  filesForEmit.forEach(collectLinkedAliases);
112900
112976
  }
112901
112977
  const declarationTransform = transformNodes(
@@ -120989,7 +121065,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
120989
121065
  continue;
120990
121066
  }
120991
121067
  const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
120992
- const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension);
121068
+ const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
120993
121069
  const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
120994
121070
  const resolvedFileName = resolution.resolvedFileName;
120995
121071
  if (isFromNodeModulesSearch) {
@@ -121284,6 +121360,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
121284
121360
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit");
121285
121361
  }
121286
121362
  }
121363
+ if (options.noCheck) {
121364
+ if (options.noEmit) {
121365
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
121366
+ }
121367
+ if (!options.emitDeclarationOnly) {
121368
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
121369
+ }
121370
+ }
121287
121371
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
121288
121372
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
121289
121373
  }
package/lib/typescript.js CHANGED
@@ -511,6 +511,7 @@ __export(typescript_exports, {
511
511
  defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,
512
512
  diagnosticCategoryName: () => diagnosticCategoryName,
513
513
  diagnosticToString: () => diagnosticToString,
514
+ diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,
514
515
  directoryProbablyExists: () => directoryProbablyExists,
515
516
  directorySeparator: () => directorySeparator,
516
517
  displayPart: () => displayPart,
@@ -2360,7 +2361,7 @@ module.exports = __toCommonJS(typescript_exports);
2360
2361
 
2361
2362
  // src/compiler/corePublic.ts
2362
2363
  var versionMajorMinor = "5.5";
2363
- var version = `${versionMajorMinor}.0-insiders.20240426`;
2364
+ var version = `${versionMajorMinor}.0-insiders.20240427`;
2364
2365
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2365
2366
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2366
2367
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -2880,13 +2881,23 @@ function deduplicateSorted(array, comparer) {
2880
2881
  function createSortedArray() {
2881
2882
  return [];
2882
2883
  }
2883
- function insertSorted(array, insert, compare, allowDuplicates) {
2884
+ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {
2884
2885
  if (array.length === 0) {
2885
2886
  array.push(insert);
2886
2887
  return true;
2887
2888
  }
2888
2889
  const insertIndex = binarySearch(array, insert, identity, compare);
2889
2890
  if (insertIndex < 0) {
2891
+ if (equalityComparer && !allowDuplicates) {
2892
+ const idx = ~insertIndex;
2893
+ if (idx > 0 && equalityComparer(insert, array[idx - 1])) {
2894
+ return false;
2895
+ }
2896
+ if (idx < array.length && equalityComparer(insert, array[idx])) {
2897
+ array.splice(idx, 1, insert);
2898
+ return true;
2899
+ }
2900
+ }
2890
2901
  array.splice(~insertIndex, 0, insert);
2891
2902
  return true;
2892
2903
  }
@@ -11068,6 +11079,7 @@ var Diagnostics = {
11068
11079
  Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."),
11069
11080
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
11070
11081
  Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
11082
+ Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."),
11071
11083
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
11072
11084
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
11073
11085
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -14707,7 +14719,7 @@ function isExternalModuleNameRelative(moduleName) {
14707
14719
  return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);
14708
14720
  }
14709
14721
  function sortAndDeduplicateDiagnostics(diagnostics) {
14710
- return sortAndDeduplicate(diagnostics, compareDiagnostics);
14722
+ return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);
14711
14723
  }
14712
14724
  function getDefaultLibFileName(options) {
14713
14725
  switch (getEmitScriptTarget(options)) {
@@ -19831,6 +19843,9 @@ function createDiagnosticCollection() {
19831
19843
  if (result >= 0) {
19832
19844
  return diagnostics[result];
19833
19845
  }
19846
+ if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {
19847
+ return diagnostics[~result - 1];
19848
+ }
19834
19849
  return void 0;
19835
19850
  }
19836
19851
  function add(diagnostic) {
@@ -19849,7 +19864,7 @@ function createDiagnosticCollection() {
19849
19864
  }
19850
19865
  diagnostics = nonFileDiagnostics;
19851
19866
  }
19852
- insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
19867
+ insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);
19853
19868
  }
19854
19869
  function getGlobalDiagnostics() {
19855
19870
  hasReadNonFileDiagnostics = true;
@@ -21617,7 +21632,7 @@ function compareRelatedInformation(d1, d2) {
21617
21632
  return 0 /* EqualTo */;
21618
21633
  }
21619
21634
  if (d1.relatedInformation && d2.relatedInformation) {
21620
- return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
21635
+ return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
21621
21636
  const d2i = d2.relatedInformation[index];
21622
21637
  return compareDiagnostics(d1i, d2i);
21623
21638
  }) || 0 /* EqualTo */;
@@ -21627,38 +21642,78 @@ function compareRelatedInformation(d1, d2) {
21627
21642
  function compareMessageText(t1, t2) {
21628
21643
  if (typeof t1 === "string" && typeof t2 === "string") {
21629
21644
  return compareStringsCaseSensitive(t1, t2);
21630
- } else if (typeof t1 === "string") {
21631
- return -1 /* LessThan */;
21632
- } else if (typeof t2 === "string") {
21633
- return 1 /* GreaterThan */;
21634
21645
  }
21635
- let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
21646
+ if (typeof t1 === "string") {
21647
+ t1 = { messageText: t1 };
21648
+ }
21649
+ if (typeof t2 === "string") {
21650
+ t2 = { messageText: t2 };
21651
+ }
21652
+ const res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
21636
21653
  if (res) {
21637
21654
  return res;
21638
21655
  }
21639
- if (!t1.next && !t2.next) {
21656
+ return compareMessageChain(t1.next, t2.next);
21657
+ }
21658
+ function compareMessageChain(c1, c2) {
21659
+ if (c1 === void 0 && c2 === void 0) {
21640
21660
  return 0 /* EqualTo */;
21641
21661
  }
21642
- if (!t1.next) {
21662
+ if (c1 === void 0) {
21663
+ return 1 /* GreaterThan */;
21664
+ }
21665
+ if (c2 === void 0) {
21643
21666
  return -1 /* LessThan */;
21644
21667
  }
21645
- if (!t2.next) {
21668
+ return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);
21669
+ }
21670
+ function compareMessageChainSize(c1, c2) {
21671
+ if (c1 === void 0 && c2 === void 0) {
21672
+ return 0 /* EqualTo */;
21673
+ }
21674
+ if (c1 === void 0) {
21646
21675
  return 1 /* GreaterThan */;
21647
21676
  }
21648
- const len = Math.min(t1.next.length, t2.next.length);
21649
- for (let i = 0; i < len; i++) {
21650
- res = compareMessageText(t1.next[i], t2.next[i]);
21677
+ if (c2 === void 0) {
21678
+ return -1 /* LessThan */;
21679
+ }
21680
+ let res = compareValues(c2.length, c1.length);
21681
+ if (res) {
21682
+ return res;
21683
+ }
21684
+ for (let i = 0; i < c2.length; i++) {
21685
+ res = compareMessageChainSize(c1[i].next, c2[i].next);
21651
21686
  if (res) {
21652
21687
  return res;
21653
21688
  }
21654
21689
  }
21655
- if (t1.next.length < t2.next.length) {
21656
- return -1 /* LessThan */;
21657
- } else if (t1.next.length > t2.next.length) {
21658
- return 1 /* GreaterThan */;
21690
+ return 0 /* EqualTo */;
21691
+ }
21692
+ function compareMessageChainContent(c1, c2) {
21693
+ let res;
21694
+ for (let i = 0; i < c2.length; i++) {
21695
+ res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);
21696
+ if (res) {
21697
+ return res;
21698
+ }
21699
+ if (c1[i].next === void 0) {
21700
+ continue;
21701
+ }
21702
+ res = compareMessageChainContent(c1[i].next, c2[i].next);
21703
+ if (res) {
21704
+ return res;
21705
+ }
21659
21706
  }
21660
21707
  return 0 /* EqualTo */;
21661
21708
  }
21709
+ function diagnosticsEqualityComparer(d1, d2) {
21710
+ return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(d1.code, d2.code) === 0 /* EqualTo */ && messageTextEqualityComparer(d1.messageText, d2.messageText);
21711
+ }
21712
+ function messageTextEqualityComparer(m1, m2) {
21713
+ const t1 = typeof m1 === "string" ? m1 : m1.messageText;
21714
+ const t2 = typeof m2 === "string" ? m2 : m2.messageText;
21715
+ return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;
21716
+ }
21662
21717
  function getLanguageVariant(scriptKind) {
21663
21718
  return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
21664
21719
  }
@@ -22549,7 +22604,7 @@ function rangeOfTypeParameters(sourceFile, typeParameters) {
22549
22604
  return { pos, end };
22550
22605
  }
22551
22606
  function skipTypeChecking(sourceFile, options, host) {
22552
- return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
22607
+ return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || options.noCheck || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName);
22553
22608
  }
22554
22609
  function isJsonEqual(a, b) {
22555
22610
  return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual);
@@ -40475,6 +40530,20 @@ var commandOptionsWithoutBuild = [
40475
40530
  defaultValueDescription: false,
40476
40531
  description: Diagnostics.Disable_emitting_comments
40477
40532
  },
40533
+ {
40534
+ name: "noCheck",
40535
+ type: "boolean",
40536
+ showInSimplifiedHelpView: false,
40537
+ category: Diagnostics.Compiler_Diagnostics,
40538
+ description: Diagnostics.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported,
40539
+ transpileOptionValue: void 0,
40540
+ defaultValueDescription: false,
40541
+ affectsSemanticDiagnostics: true,
40542
+ affectsBuildInfo: true,
40543
+ extraValidation() {
40544
+ return [Diagnostics.Unknown_compiler_option_0, "noCheck"];
40545
+ }
40546
+ },
40478
40547
  {
40479
40548
  name: "noEmit",
40480
40549
  type: "boolean",
@@ -42347,11 +42416,11 @@ function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, exis
42347
42416
  const excludeOfRaw = getSpecsFromRaw("exclude");
42348
42417
  let isDefaultIncludeSpec = false;
42349
42418
  let excludeSpecs = toPropValue(excludeOfRaw);
42350
- if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
42351
- const outDir = raw.compilerOptions.outDir;
42352
- const declarationDir = raw.compilerOptions.declarationDir;
42419
+ if (excludeOfRaw === "no-prop") {
42420
+ const outDir = options.outDir;
42421
+ const declarationDir = options.declarationDir;
42353
42422
  if (outDir || declarationDir) {
42354
- excludeSpecs = [outDir, declarationDir].filter((d) => !!d);
42423
+ excludeSpecs = filter([outDir, declarationDir], (d) => !!d);
42355
42424
  }
42356
42425
  }
42357
42426
  if (filesSpecs === void 0 && includeSpecs === void 0) {
@@ -56911,6 +56980,7 @@ function createTypeChecker(host) {
56911
56980
  }
56912
56981
  }
56913
56982
  function serializeSymbol(symbol, isPrivate, propertyAsAlias) {
56983
+ void getPropertiesOfType(getTypeOfSymbol(symbol));
56914
56984
  const visitedSym = getMergedSymbol(symbol);
56915
56985
  if (visitedSymbols.has(getSymbolId(visitedSym))) {
56916
56986
  return;
@@ -59534,7 +59604,7 @@ function createTypeChecker(host) {
59534
59604
  }
59535
59605
  type = anyType;
59536
59606
  }
59537
- links.type = type;
59607
+ links.type ?? (links.type = type);
59538
59608
  }
59539
59609
  return links.type;
59540
59610
  }
@@ -59552,7 +59622,7 @@ function createTypeChecker(host) {
59552
59622
  }
59553
59623
  writeType = anyType;
59554
59624
  }
59555
- links.writeType = writeType || getTypeOfAccessors(symbol);
59625
+ links.writeType ?? (links.writeType = writeType || getTypeOfAccessors(symbol));
59556
59626
  }
59557
59627
  return links.writeType;
59558
59628
  }
@@ -59629,10 +59699,10 @@ function createTypeChecker(host) {
59629
59699
  true
59630
59700
  );
59631
59701
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
59632
- links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
59702
+ links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType);
59633
59703
  if (!popTypeResolution()) {
59634
59704
  reportCircularityError(exportSymbol ?? symbol);
59635
- return links.type = errorType;
59705
+ return links.type ?? (links.type = errorType);
59636
59706
  }
59637
59707
  }
59638
59708
  return links.type;
@@ -59898,7 +59968,7 @@ function createTypeChecker(host) {
59898
59968
  }
59899
59969
  if (!popTypeResolution()) {
59900
59970
  error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
59901
- return type.resolvedBaseConstructorType = errorType;
59971
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
59902
59972
  }
59903
59973
  if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
59904
59974
  const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
@@ -59915,9 +59985,9 @@ function createTypeChecker(host) {
59915
59985
  addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
59916
59986
  }
59917
59987
  }
59918
- return type.resolvedBaseConstructorType = errorType;
59988
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
59919
59989
  }
59920
- type.resolvedBaseConstructorType = baseConstructorType;
59990
+ type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = baseConstructorType);
59921
59991
  }
59922
59992
  return type.resolvedBaseConstructorType;
59923
59993
  }
@@ -60158,7 +60228,7 @@ function createTypeChecker(host) {
60158
60228
  error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
60159
60229
  }
60160
60230
  }
60161
- links.declaredType = type;
60231
+ links.declaredType ?? (links.declaredType = type);
60162
60232
  }
60163
60233
  return links.declaredType;
60164
60234
  }
@@ -61276,6 +61346,7 @@ function createTypeChecker(host) {
61276
61346
  }
61277
61347
  }
61278
61348
  function getTypeOfMappedSymbol(symbol) {
61349
+ var _a;
61279
61350
  if (!symbol.links.type) {
61280
61351
  const mappedType = symbol.links.mappedType;
61281
61352
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
@@ -61294,7 +61365,7 @@ function createTypeChecker(host) {
61294
61365
  error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
61295
61366
  type = errorType;
61296
61367
  }
61297
- symbol.links.type = type;
61368
+ (_a = symbol.links).type ?? (_a.type = type);
61298
61369
  }
61299
61370
  return symbol.links.type;
61300
61371
  }
@@ -61647,7 +61718,7 @@ function createTypeChecker(host) {
61647
61718
  }
61648
61719
  result = circularConstraintType;
61649
61720
  }
61650
- t.immediateBaseConstraint = result || noConstraintType;
61721
+ t.immediateBaseConstraint ?? (t.immediateBaseConstraint = result || noConstraintType);
61651
61722
  }
61652
61723
  return t.immediateBaseConstraint;
61653
61724
  }
@@ -62521,7 +62592,7 @@ function createTypeChecker(host) {
62521
62592
  }
62522
62593
  type = anyType;
62523
62594
  }
62524
- signature.resolvedReturnType = type;
62595
+ signature.resolvedReturnType ?? (signature.resolvedReturnType = type);
62525
62596
  }
62526
62597
  return signature.resolvedReturnType;
62527
62598
  }
@@ -62867,9 +62938,9 @@ function createTypeChecker(host) {
62867
62938
  const node = type.node;
62868
62939
  const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
62869
62940
  if (popTypeResolution()) {
62870
- type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
62941
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
62871
62942
  } else {
62872
- type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray;
62943
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray);
62873
62944
  error2(
62874
62945
  type.node || currentNode,
62875
62946
  type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves,
@@ -74143,7 +74214,7 @@ function createTypeChecker(host) {
74143
74214
  reportCircularityError(declaration.symbol);
74144
74215
  return true;
74145
74216
  }
74146
- links.parameterInitializerContainsUndefined = containsUndefined;
74217
+ links.parameterInitializerContainsUndefined ?? (links.parameterInitializerContainsUndefined = containsUndefined);
74147
74218
  }
74148
74219
  return links.parameterInitializerContainsUndefined;
74149
74220
  }
@@ -79552,8 +79623,13 @@ function createTypeChecker(host) {
79552
79623
  if (cached && cached !== resolvingSignature && !candidatesOutArray) {
79553
79624
  return cached;
79554
79625
  }
79626
+ const saveResolutionStart = resolutionStart;
79627
+ if (!cached) {
79628
+ resolutionStart = resolutionTargets.length;
79629
+ }
79555
79630
  links.resolvedSignature = resolvingSignature;
79556
79631
  let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);
79632
+ resolutionStart = saveResolutionStart;
79557
79633
  if (result !== resolvingSignature) {
79558
79634
  if (links.resolvedSignature !== resolvingSignature) {
79559
79635
  result = links.resolvedSignature;
@@ -90157,6 +90233,7 @@ function createTypeChecker(host) {
90157
90233
  if (!sym) {
90158
90234
  return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker);
90159
90235
  }
90236
+ resolveExternalModuleSymbol(sym);
90160
90237
  return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker);
90161
90238
  },
90162
90239
  isImportRequiredByAugmentation
@@ -117922,7 +117999,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla
117922
117999
  const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;
117923
118000
  const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson);
117924
118001
  const inputListOrBundle = compilerOptions.outFile ? [factory.createBundle(filesForEmit)] : filesForEmit;
117925
- if (emitOnly && !getEmitDeclarations(compilerOptions)) {
118002
+ if (emitOnly && !getEmitDeclarations(compilerOptions) || compilerOptions.noCheck) {
117926
118003
  filesForEmit.forEach(collectLinkedAliases);
117927
118004
  }
117928
118005
  const declarationTransform = transformNodes(
@@ -126062,7 +126139,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126062
126139
  continue;
126063
126140
  }
126064
126141
  const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
126065
- const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension);
126142
+ const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
126066
126143
  const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
126067
126144
  const resolvedFileName = resolution.resolvedFileName;
126068
126145
  if (isFromNodeModulesSearch) {
@@ -126357,6 +126434,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
126357
126434
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit");
126358
126435
  }
126359
126436
  }
126437
+ if (options.noCheck) {
126438
+ if (options.noEmit) {
126439
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit");
126440
+ }
126441
+ if (!options.emitDeclarationOnly) {
126442
+ createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noCheck", "emitDeclarationOnly");
126443
+ }
126444
+ }
126360
126445
  if (options.emitDecoratorMetadata && !options.experimentalDecorators) {
126361
126446
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators");
126362
126447
  }
@@ -141705,6 +141790,7 @@ function transpileWorker(input, transpileOptions, declaration) {
141705
141790
  options.declaration = true;
141706
141791
  options.emitDeclarationOnly = true;
141707
141792
  options.isolatedDeclarations = true;
141793
+ options.noCheck = true;
141708
141794
  } else {
141709
141795
  options.declaration = false;
141710
141796
  }
@@ -162658,6 +162744,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162658
162744
  entries,
162659
162745
  keywordEntry,
162660
162746
  compareCompletionEntries,
162747
+ /*equalityComparer*/
162748
+ void 0,
162661
162749
  /*allowDuplicates*/
162662
162750
  true
162663
162751
  );
@@ -162671,6 +162759,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162671
162759
  entries,
162672
162760
  keywordEntry,
162673
162761
  compareCompletionEntries,
162762
+ /*equalityComparer*/
162763
+ void 0,
162674
162764
  /*allowDuplicates*/
162675
162765
  true
162676
162766
  );
@@ -162683,6 +162773,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162683
162773
  entries,
162684
162774
  literalEntry,
162685
162775
  compareCompletionEntries,
162776
+ /*equalityComparer*/
162777
+ void 0,
162686
162778
  /*allowDuplicates*/
162687
162779
  true
162688
162780
  );
@@ -163605,6 +163697,8 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
163605
163697
  entries,
163606
163698
  entry,
163607
163699
  compareCompletionEntries,
163700
+ /*equalityComparer*/
163701
+ void 0,
163608
163702
  /*allowDuplicates*/
163609
163703
  true
163610
163704
  );
@@ -178202,6 +178296,7 @@ __export(ts_exports2, {
178202
178296
  defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,
178203
178297
  diagnosticCategoryName: () => diagnosticCategoryName,
178204
178298
  diagnosticToString: () => diagnosticToString,
178299
+ diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,
178205
178300
  directoryProbablyExists: () => directoryProbablyExists,
178206
178301
  directorySeparator: () => directorySeparator,
178207
178302
  displayPart: () => displayPart,
@@ -192628,6 +192723,7 @@ if (typeof console !== "undefined") {
192628
192723
  defaultMaximumTruncationLength,
192629
192724
  diagnosticCategoryName,
192630
192725
  diagnosticToString,
192726
+ diagnosticsEqualityComparer,
192631
192727
  directoryProbablyExists,
192632
192728
  directorySeparator,
192633
192729
  displayPart,
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": "5.5.0-pr-58333-2",
5
+ "version": "5.5.0-pr-58337-27",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [