@typescript-deploys/pr-build 5.8.0-pr-60800-2 → 5.8.0-pr-60718-47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_tsc.js +36 -65
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +37 -65
- package/package.json +21 -21
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.8";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20241218`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -5502,33 +5502,7 @@ function getNormalizedPathComponents(path, currentDirectory) {
|
|
|
5502
5502
|
return reducePathComponents(getPathComponents(path, currentDirectory));
|
|
5503
5503
|
}
|
|
5504
5504
|
function getNormalizedAbsolutePath(fileName, currentDirectory) {
|
|
5505
|
-
|
|
5506
|
-
return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
|
|
5507
|
-
}
|
|
5508
|
-
return fileName;
|
|
5509
|
-
}
|
|
5510
|
-
function isNotNormalizedOrAbsolute(s) {
|
|
5511
|
-
if (getEncodedRootLength(s) === 0) return true;
|
|
5512
|
-
if (s.length > 0) {
|
|
5513
|
-
const lastChar = s.charCodeAt(s.length - 1);
|
|
5514
|
-
if (lastChar === 47 /* slash */ || lastChar === 92 /* backslash */) return true;
|
|
5515
|
-
}
|
|
5516
|
-
for (let i = 0, n = s.length - 1; i < n; i++) {
|
|
5517
|
-
const curr = s.charCodeAt(i);
|
|
5518
|
-
const next = s.charCodeAt(i + 1);
|
|
5519
|
-
if (curr === 46 /* dot */) {
|
|
5520
|
-
if (next === 47 /* slash */) {
|
|
5521
|
-
return true;
|
|
5522
|
-
}
|
|
5523
|
-
} else if (curr === 47 /* slash */) {
|
|
5524
|
-
if (next === 47 /* slash */) {
|
|
5525
|
-
return true;
|
|
5526
|
-
}
|
|
5527
|
-
} else if (curr === 92 /* backslash */) {
|
|
5528
|
-
return true;
|
|
5529
|
-
}
|
|
5530
|
-
}
|
|
5531
|
-
return false;
|
|
5505
|
+
return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
|
|
5532
5506
|
}
|
|
5533
5507
|
function normalizePath(path) {
|
|
5534
5508
|
path = normalizeSlashes(path);
|
|
@@ -58153,6 +58127,9 @@ function createTypeChecker(host) {
|
|
|
58153
58127
|
if (isLiteralType(type) || isPatternLiteralType(type)) {
|
|
58154
58128
|
checkFlags |= 128 /* HasLiteralType */;
|
|
58155
58129
|
}
|
|
58130
|
+
if (type.flags & 402784252 /* Primitive */) {
|
|
58131
|
+
checkFlags |= 2097152 /* HasPrimitiveType */;
|
|
58132
|
+
}
|
|
58156
58133
|
if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) {
|
|
58157
58134
|
checkFlags |= 131072 /* HasNeverType */;
|
|
58158
58135
|
}
|
|
@@ -68471,14 +68448,20 @@ function createTypeChecker(host) {
|
|
|
68471
68448
|
}
|
|
68472
68449
|
return false;
|
|
68473
68450
|
}
|
|
68474
|
-
function isDiscriminantProperty(type, name) {
|
|
68451
|
+
function isDiscriminantProperty(type, name, considerNonUniformPrimitivePropDiscriminant = false) {
|
|
68452
|
+
var _a;
|
|
68475
68453
|
if (type && type.flags & 1048576 /* Union */) {
|
|
68476
68454
|
const prop = getUnionOrIntersectionProperty(type, name);
|
|
68477
68455
|
if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
|
|
68478
|
-
|
|
68479
|
-
|
|
68456
|
+
const propType = getTypeOfSymbol(prop);
|
|
68457
|
+
const transientSymbol = prop;
|
|
68458
|
+
(_a = transientSymbol.links).isDiscriminantProperty ?? (_a.isDiscriminantProperty = /* @__PURE__ */ new Map());
|
|
68459
|
+
let isDiscriminant = transientSymbol.links.isDiscriminantProperty.get(considerNonUniformPrimitivePropDiscriminant);
|
|
68460
|
+
if (isDiscriminant === void 0) {
|
|
68461
|
+
isDiscriminant = ((transientSymbol.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ || !!(considerNonUniformPrimitivePropDiscriminant && transientSymbol.links.checkFlags & (64 /* HasNonUniformType */ | 2097152 /* HasPrimitiveType */))) && !isGenericType(propType);
|
|
68462
|
+
transientSymbol.links.isDiscriminantProperty.set(considerNonUniformPrimitivePropDiscriminant, isDiscriminant);
|
|
68480
68463
|
}
|
|
68481
|
-
return
|
|
68464
|
+
return isDiscriminant;
|
|
68482
68465
|
}
|
|
68483
68466
|
}
|
|
68484
68467
|
return false;
|
|
@@ -69726,7 +69709,12 @@ function createTypeChecker(host) {
|
|
|
69726
69709
|
const name = getAccessedPropertyName(access);
|
|
69727
69710
|
if (name) {
|
|
69728
69711
|
const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType;
|
|
69729
|
-
if (isDiscriminantProperty(
|
|
69712
|
+
if (isDiscriminantProperty(
|
|
69713
|
+
type,
|
|
69714
|
+
name,
|
|
69715
|
+
/*considerNonUniformPrimitivePropDiscriminant*/
|
|
69716
|
+
true
|
|
69717
|
+
)) {
|
|
69730
69718
|
return access;
|
|
69731
69719
|
}
|
|
69732
69720
|
}
|
|
@@ -121231,9 +121219,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121231
121219
|
let skipDefaultLib = options.noLib;
|
|
121232
121220
|
const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
|
|
121233
121221
|
const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
|
|
121234
|
-
|
|
121235
|
-
let reuseConfigDiagnostics = false;
|
|
121236
|
-
let configDiagnostics;
|
|
121222
|
+
const programDiagnostics = createDiagnosticCollection();
|
|
121237
121223
|
let lazyProgramDiagnosticExplainingFile = [];
|
|
121238
121224
|
const currentDirectory = host.getCurrentDirectory();
|
|
121239
121225
|
const supportedExtensions = getSupportedExtensions(options);
|
|
@@ -121528,7 +121514,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121528
121514
|
resolvedModules,
|
|
121529
121515
|
resolvedTypeReferenceDirectiveNames,
|
|
121530
121516
|
resolvedLibReferences,
|
|
121531
|
-
getConfigDiagnostics: () => configDiagnostics,
|
|
121532
121517
|
getResolvedModule,
|
|
121533
121518
|
getResolvedModuleFromModuleSpecifier,
|
|
121534
121519
|
getResolvedTypeReferenceDirective,
|
|
@@ -121567,19 +121552,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
121567
121552
|
getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
|
|
121568
121553
|
};
|
|
121569
121554
|
onProgramCreateComplete();
|
|
121570
|
-
|
|
121571
|
-
verifyCompilerOptions();
|
|
121572
|
-
}
|
|
121555
|
+
verifyCompilerOptions();
|
|
121573
121556
|
mark("afterProgram");
|
|
121574
121557
|
measure("Program", "beforeProgram", "afterProgram");
|
|
121575
121558
|
(_p = tracing) == null ? void 0 : _p.pop();
|
|
121576
121559
|
return program;
|
|
121577
121560
|
function updateAndGetProgramDiagnostics() {
|
|
121578
|
-
if (programDiagnostics) {
|
|
121579
|
-
return programDiagnostics;
|
|
121580
|
-
}
|
|
121581
|
-
programDiagnostics = createDiagnosticCollection();
|
|
121582
|
-
configDiagnostics == null ? void 0 : configDiagnostics.getDiagnostics().forEach((d) => programDiagnostics.add(d));
|
|
121583
121561
|
if (lazyProgramDiagnosticExplainingFile) {
|
|
121584
121562
|
fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
|
|
121585
121563
|
switch (diagnostic.kind) {
|
|
@@ -122094,10 +122072,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
122094
122072
|
}
|
|
122095
122073
|
filesByName.set(path, filesByName.get(oldFile.path));
|
|
122096
122074
|
});
|
|
122097
|
-
if (oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations)) {
|
|
122098
|
-
configDiagnostics = oldProgram.getConfigDiagnostics();
|
|
122099
|
-
reuseConfigDiagnostics = true;
|
|
122100
|
-
}
|
|
122101
122075
|
files = newSourceFiles;
|
|
122102
122076
|
fileReasons = oldProgram.getFileIncludeReasons();
|
|
122103
122077
|
fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
|
|
@@ -123456,7 +123430,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
123456
123430
|
}
|
|
123457
123431
|
const outputFile = options.outFile;
|
|
123458
123432
|
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
|
|
123459
|
-
|
|
123433
|
+
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
|
123460
123434
|
}
|
|
123461
123435
|
verifyDeprecatedCompilerOptions();
|
|
123462
123436
|
verifyProjectReferences();
|
|
@@ -123558,14 +123532,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
123558
123532
|
}
|
|
123559
123533
|
} else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) {
|
|
123560
123534
|
const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
123561
|
-
|
|
123535
|
+
programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
|
|
123562
123536
|
}
|
|
123563
123537
|
if (outputFile && !options.emitDeclarationOnly) {
|
|
123564
123538
|
if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) {
|
|
123565
123539
|
createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
|
|
123566
123540
|
} else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
|
|
123567
123541
|
const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
123568
|
-
|
|
123542
|
+
programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
|
|
123569
123543
|
}
|
|
123570
123544
|
}
|
|
123571
123545
|
if (getResolveJsonModule(options)) {
|
|
@@ -124036,7 +124010,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124036
124010
|
forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {
|
|
124037
124011
|
const initializer = keyProps.initializer;
|
|
124038
124012
|
if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) {
|
|
124039
|
-
|
|
124013
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
|
|
124040
124014
|
needCompilerDiagnostic = false;
|
|
124041
124015
|
}
|
|
124042
124016
|
});
|
|
@@ -124104,9 +124078,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124104
124078
|
function createDiagnosticForReference(sourceFile, index, message, ...args) {
|
|
124105
124079
|
const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
124106
124080
|
if (referencesSyntax && referencesSyntax.elements.length > index) {
|
|
124107
|
-
|
|
124081
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
|
|
124108
124082
|
} else {
|
|
124109
|
-
|
|
124083
|
+
programDiagnostics.add(createCompilerDiagnostic(message, ...args));
|
|
124110
124084
|
}
|
|
124111
124085
|
}
|
|
124112
124086
|
function createDiagnosticForOption(onKey, option1, option2, message, ...args) {
|
|
@@ -124120,14 +124094,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124120
124094
|
const compilerOptionsProperty = getCompilerOptionsPropertySyntax();
|
|
124121
124095
|
if (compilerOptionsProperty) {
|
|
124122
124096
|
if ("messageText" in message) {
|
|
124123
|
-
|
|
124097
|
+
programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
|
|
124124
124098
|
} else {
|
|
124125
|
-
|
|
124099
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
|
|
124126
124100
|
}
|
|
124127
124101
|
} else if ("messageText" in message) {
|
|
124128
|
-
|
|
124102
|
+
programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));
|
|
124129
124103
|
} else {
|
|
124130
|
-
|
|
124104
|
+
programDiagnostics.add(createCompilerDiagnostic(message, ...args));
|
|
124131
124105
|
}
|
|
124132
124106
|
}
|
|
124133
124107
|
function getCompilerOptionsObjectLiteralSyntax() {
|
|
@@ -124151,9 +124125,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124151
124125
|
let needsCompilerDiagnostic = false;
|
|
124152
124126
|
forEachPropertyAssignment(objectLiteral, key1, (prop) => {
|
|
124153
124127
|
if ("messageText" in message) {
|
|
124154
|
-
|
|
124128
|
+
programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
|
|
124155
124129
|
} else {
|
|
124156
|
-
|
|
124130
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
|
|
124157
124131
|
}
|
|
124158
124132
|
needsCompilerDiagnostic = true;
|
|
124159
124133
|
}, key2);
|
|
@@ -124161,10 +124135,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
124161
124135
|
}
|
|
124162
124136
|
function blockEmittingOfFile(emitFileName, diag2) {
|
|
124163
124137
|
hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true);
|
|
124164
|
-
|
|
124165
|
-
}
|
|
124166
|
-
function addConfigDiagnostic(diag2) {
|
|
124167
|
-
(configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2);
|
|
124138
|
+
programDiagnostics.add(diag2);
|
|
124168
124139
|
}
|
|
124169
124140
|
function isEmittedFile(file) {
|
|
124170
124141
|
if (options.noEmit) {
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4990,7 +4990,7 @@ declare namespace ts {
|
|
|
4990
4990
|
readonly modifiers?: NodeArray<Modifier>;
|
|
4991
4991
|
readonly equalsGreaterThanToken: EqualsGreaterThanToken;
|
|
4992
4992
|
readonly body: ConciseBody;
|
|
4993
|
-
readonly name
|
|
4993
|
+
readonly name?: never;
|
|
4994
4994
|
}
|
|
4995
4995
|
interface LiteralLikeNode extends Node {
|
|
4996
4996
|
text: string;
|
package/lib/typescript.js
CHANGED
|
@@ -2279,7 +2279,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2279
2279
|
|
|
2280
2280
|
// src/compiler/corePublic.ts
|
|
2281
2281
|
var versionMajorMinor = "5.8";
|
|
2282
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2282
|
+
var version = `${versionMajorMinor}.0-insiders.20241218`;
|
|
2283
2283
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2284
2284
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2285
2285
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6363,6 +6363,7 @@ var CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
|
|
|
6363
6363
|
CheckFlags2[CheckFlags2["Mapped"] = 262144] = "Mapped";
|
|
6364
6364
|
CheckFlags2[CheckFlags2["StripOptional"] = 524288] = "StripOptional";
|
|
6365
6365
|
CheckFlags2[CheckFlags2["Unresolved"] = 1048576] = "Unresolved";
|
|
6366
|
+
CheckFlags2[CheckFlags2["HasPrimitiveType"] = 2097152] = "HasPrimitiveType";
|
|
6366
6367
|
CheckFlags2[CheckFlags2["Synthetic"] = 6] = "Synthetic";
|
|
6367
6368
|
CheckFlags2[CheckFlags2["Discriminant"] = 192] = "Discriminant";
|
|
6368
6369
|
CheckFlags2[CheckFlags2["Partial"] = 48] = "Partial";
|
|
@@ -8876,33 +8877,7 @@ function getNormalizedPathComponents(path, currentDirectory) {
|
|
|
8876
8877
|
return reducePathComponents(getPathComponents(path, currentDirectory));
|
|
8877
8878
|
}
|
|
8878
8879
|
function getNormalizedAbsolutePath(fileName, currentDirectory) {
|
|
8879
|
-
|
|
8880
|
-
return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
|
|
8881
|
-
}
|
|
8882
|
-
return fileName;
|
|
8883
|
-
}
|
|
8884
|
-
function isNotNormalizedOrAbsolute(s) {
|
|
8885
|
-
if (getEncodedRootLength(s) === 0) return true;
|
|
8886
|
-
if (s.length > 0) {
|
|
8887
|
-
const lastChar = s.charCodeAt(s.length - 1);
|
|
8888
|
-
if (lastChar === 47 /* slash */ || lastChar === 92 /* backslash */) return true;
|
|
8889
|
-
}
|
|
8890
|
-
for (let i = 0, n = s.length - 1; i < n; i++) {
|
|
8891
|
-
const curr = s.charCodeAt(i);
|
|
8892
|
-
const next = s.charCodeAt(i + 1);
|
|
8893
|
-
if (curr === 46 /* dot */) {
|
|
8894
|
-
if (next === 47 /* slash */) {
|
|
8895
|
-
return true;
|
|
8896
|
-
}
|
|
8897
|
-
} else if (curr === 47 /* slash */) {
|
|
8898
|
-
if (next === 47 /* slash */) {
|
|
8899
|
-
return true;
|
|
8900
|
-
}
|
|
8901
|
-
} else if (curr === 92 /* backslash */) {
|
|
8902
|
-
return true;
|
|
8903
|
-
}
|
|
8904
|
-
}
|
|
8905
|
-
return false;
|
|
8880
|
+
return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
|
|
8906
8881
|
}
|
|
8907
8882
|
function normalizePath(path) {
|
|
8908
8883
|
path = normalizeSlashes(path);
|
|
@@ -62757,6 +62732,9 @@ function createTypeChecker(host) {
|
|
|
62757
62732
|
if (isLiteralType(type) || isPatternLiteralType(type)) {
|
|
62758
62733
|
checkFlags |= 128 /* HasLiteralType */;
|
|
62759
62734
|
}
|
|
62735
|
+
if (type.flags & 402784252 /* Primitive */) {
|
|
62736
|
+
checkFlags |= 2097152 /* HasPrimitiveType */;
|
|
62737
|
+
}
|
|
62760
62738
|
if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) {
|
|
62761
62739
|
checkFlags |= 131072 /* HasNeverType */;
|
|
62762
62740
|
}
|
|
@@ -73075,14 +73053,20 @@ function createTypeChecker(host) {
|
|
|
73075
73053
|
}
|
|
73076
73054
|
return false;
|
|
73077
73055
|
}
|
|
73078
|
-
function isDiscriminantProperty(type, name) {
|
|
73056
|
+
function isDiscriminantProperty(type, name, considerNonUniformPrimitivePropDiscriminant = false) {
|
|
73057
|
+
var _a;
|
|
73079
73058
|
if (type && type.flags & 1048576 /* Union */) {
|
|
73080
73059
|
const prop = getUnionOrIntersectionProperty(type, name);
|
|
73081
73060
|
if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) {
|
|
73082
|
-
|
|
73083
|
-
|
|
73061
|
+
const propType = getTypeOfSymbol(prop);
|
|
73062
|
+
const transientSymbol = prop;
|
|
73063
|
+
(_a = transientSymbol.links).isDiscriminantProperty ?? (_a.isDiscriminantProperty = /* @__PURE__ */ new Map());
|
|
73064
|
+
let isDiscriminant = transientSymbol.links.isDiscriminantProperty.get(considerNonUniformPrimitivePropDiscriminant);
|
|
73065
|
+
if (isDiscriminant === void 0) {
|
|
73066
|
+
isDiscriminant = ((transientSymbol.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ || !!(considerNonUniformPrimitivePropDiscriminant && transientSymbol.links.checkFlags & (64 /* HasNonUniformType */ | 2097152 /* HasPrimitiveType */))) && !isGenericType(propType);
|
|
73067
|
+
transientSymbol.links.isDiscriminantProperty.set(considerNonUniformPrimitivePropDiscriminant, isDiscriminant);
|
|
73084
73068
|
}
|
|
73085
|
-
return
|
|
73069
|
+
return isDiscriminant;
|
|
73086
73070
|
}
|
|
73087
73071
|
}
|
|
73088
73072
|
return false;
|
|
@@ -74330,7 +74314,12 @@ function createTypeChecker(host) {
|
|
|
74330
74314
|
const name = getAccessedPropertyName(access);
|
|
74331
74315
|
if (name) {
|
|
74332
74316
|
const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType;
|
|
74333
|
-
if (isDiscriminantProperty(
|
|
74317
|
+
if (isDiscriminantProperty(
|
|
74318
|
+
type,
|
|
74319
|
+
name,
|
|
74320
|
+
/*considerNonUniformPrimitivePropDiscriminant*/
|
|
74321
|
+
true
|
|
74322
|
+
)) {
|
|
74334
74323
|
return access;
|
|
74335
74324
|
}
|
|
74336
74325
|
}
|
|
@@ -126074,9 +126063,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126074
126063
|
let skipDefaultLib = options.noLib;
|
|
126075
126064
|
const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options));
|
|
126076
126065
|
const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName());
|
|
126077
|
-
|
|
126078
|
-
let reuseConfigDiagnostics = false;
|
|
126079
|
-
let configDiagnostics;
|
|
126066
|
+
const programDiagnostics = createDiagnosticCollection();
|
|
126080
126067
|
let lazyProgramDiagnosticExplainingFile = [];
|
|
126081
126068
|
const currentDirectory = host.getCurrentDirectory();
|
|
126082
126069
|
const supportedExtensions = getSupportedExtensions(options);
|
|
@@ -126371,7 +126358,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126371
126358
|
resolvedModules,
|
|
126372
126359
|
resolvedTypeReferenceDirectiveNames,
|
|
126373
126360
|
resolvedLibReferences,
|
|
126374
|
-
getConfigDiagnostics: () => configDiagnostics,
|
|
126375
126361
|
getResolvedModule,
|
|
126376
126362
|
getResolvedModuleFromModuleSpecifier,
|
|
126377
126363
|
getResolvedTypeReferenceDirective,
|
|
@@ -126410,19 +126396,12 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126410
126396
|
getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
|
|
126411
126397
|
};
|
|
126412
126398
|
onProgramCreateComplete();
|
|
126413
|
-
|
|
126414
|
-
verifyCompilerOptions();
|
|
126415
|
-
}
|
|
126399
|
+
verifyCompilerOptions();
|
|
126416
126400
|
mark("afterProgram");
|
|
126417
126401
|
measure("Program", "beforeProgram", "afterProgram");
|
|
126418
126402
|
(_p = tracing) == null ? void 0 : _p.pop();
|
|
126419
126403
|
return program;
|
|
126420
126404
|
function updateAndGetProgramDiagnostics() {
|
|
126421
|
-
if (programDiagnostics) {
|
|
126422
|
-
return programDiagnostics;
|
|
126423
|
-
}
|
|
126424
|
-
programDiagnostics = createDiagnosticCollection();
|
|
126425
|
-
configDiagnostics == null ? void 0 : configDiagnostics.getDiagnostics().forEach((d) => programDiagnostics.add(d));
|
|
126426
126405
|
if (lazyProgramDiagnosticExplainingFile) {
|
|
126427
126406
|
fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => {
|
|
126428
126407
|
switch (diagnostic.kind) {
|
|
@@ -126937,10 +126916,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
126937
126916
|
}
|
|
126938
126917
|
filesByName.set(path, filesByName.get(oldFile.path));
|
|
126939
126918
|
});
|
|
126940
|
-
if (oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations)) {
|
|
126941
|
-
configDiagnostics = oldProgram.getConfigDiagnostics();
|
|
126942
|
-
reuseConfigDiagnostics = true;
|
|
126943
|
-
}
|
|
126944
126919
|
files = newSourceFiles;
|
|
126945
126920
|
fileReasons = oldProgram.getFileIncludeReasons();
|
|
126946
126921
|
fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
|
|
@@ -128299,7 +128274,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128299
128274
|
}
|
|
128300
128275
|
const outputFile = options.outFile;
|
|
128301
128276
|
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
|
|
128302
|
-
|
|
128277
|
+
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
|
128303
128278
|
}
|
|
128304
128279
|
verifyDeprecatedCompilerOptions();
|
|
128305
128280
|
verifyProjectReferences();
|
|
@@ -128401,14 +128376,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128401
128376
|
}
|
|
128402
128377
|
} else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) {
|
|
128403
128378
|
const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
128404
|
-
|
|
128379
|
+
programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
|
|
128405
128380
|
}
|
|
128406
128381
|
if (outputFile && !options.emitDeclarationOnly) {
|
|
128407
128382
|
if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) {
|
|
128408
128383
|
createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
|
|
128409
128384
|
} else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
|
|
128410
128385
|
const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
128411
|
-
|
|
128386
|
+
programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
|
|
128412
128387
|
}
|
|
128413
128388
|
}
|
|
128414
128389
|
if (getResolveJsonModule(options)) {
|
|
@@ -128879,7 +128854,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128879
128854
|
forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {
|
|
128880
128855
|
const initializer = keyProps.initializer;
|
|
128881
128856
|
if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) {
|
|
128882
|
-
|
|
128857
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args));
|
|
128883
128858
|
needCompilerDiagnostic = false;
|
|
128884
128859
|
}
|
|
128885
128860
|
});
|
|
@@ -128947,9 +128922,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128947
128922
|
function createDiagnosticForReference(sourceFile, index, message, ...args) {
|
|
128948
128923
|
const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
128949
128924
|
if (referencesSyntax && referencesSyntax.elements.length > index) {
|
|
128950
|
-
|
|
128925
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args));
|
|
128951
128926
|
} else {
|
|
128952
|
-
|
|
128927
|
+
programDiagnostics.add(createCompilerDiagnostic(message, ...args));
|
|
128953
128928
|
}
|
|
128954
128929
|
}
|
|
128955
128930
|
function createDiagnosticForOption(onKey, option1, option2, message, ...args) {
|
|
@@ -128963,14 +128938,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128963
128938
|
const compilerOptionsProperty = getCompilerOptionsPropertySyntax();
|
|
128964
128939
|
if (compilerOptionsProperty) {
|
|
128965
128940
|
if ("messageText" in message) {
|
|
128966
|
-
|
|
128941
|
+
programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message));
|
|
128967
128942
|
} else {
|
|
128968
|
-
|
|
128943
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args));
|
|
128969
128944
|
}
|
|
128970
128945
|
} else if ("messageText" in message) {
|
|
128971
|
-
|
|
128946
|
+
programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));
|
|
128972
128947
|
} else {
|
|
128973
|
-
|
|
128948
|
+
programDiagnostics.add(createCompilerDiagnostic(message, ...args));
|
|
128974
128949
|
}
|
|
128975
128950
|
}
|
|
128976
128951
|
function getCompilerOptionsObjectLiteralSyntax() {
|
|
@@ -128994,9 +128969,9 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
128994
128969
|
let needsCompilerDiagnostic = false;
|
|
128995
128970
|
forEachPropertyAssignment(objectLiteral, key1, (prop) => {
|
|
128996
128971
|
if ("messageText" in message) {
|
|
128997
|
-
|
|
128972
|
+
programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
|
|
128998
128973
|
} else {
|
|
128999
|
-
|
|
128974
|
+
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
|
|
129000
128975
|
}
|
|
129001
128976
|
needsCompilerDiagnostic = true;
|
|
129002
128977
|
}, key2);
|
|
@@ -129004,10 +128979,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
129004
128979
|
}
|
|
129005
128980
|
function blockEmittingOfFile(emitFileName, diag2) {
|
|
129006
128981
|
hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true);
|
|
129007
|
-
|
|
129008
|
-
}
|
|
129009
|
-
function addConfigDiagnostic(diag2) {
|
|
129010
|
-
(configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2);
|
|
128982
|
+
programDiagnostics.add(diag2);
|
|
129011
128983
|
}
|
|
129012
128984
|
function isEmittedFile(file) {
|
|
129013
128985
|
if (options.noEmit) {
|
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.8.0-pr-
|
|
5
|
+
"version": "5.8.0-pr-60718-47",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -40,48 +40,48 @@
|
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@dprint/formatter": "^0.4.1",
|
|
43
|
-
"@dprint/typescript": "0.93.
|
|
43
|
+
"@dprint/typescript": "0.93.3",
|
|
44
44
|
"@esfx/canceltoken": "^1.0.0",
|
|
45
|
-
"@eslint/js": "^9.
|
|
45
|
+
"@eslint/js": "^9.17.0",
|
|
46
46
|
"@octokit/rest": "^21.0.2",
|
|
47
47
|
"@types/chai": "^4.3.20",
|
|
48
|
-
"@types/diff": "^5.2.
|
|
48
|
+
"@types/diff": "^5.2.3",
|
|
49
49
|
"@types/minimist": "^1.2.5",
|
|
50
|
-
"@types/mocha": "^10.0.
|
|
50
|
+
"@types/mocha": "^10.0.10",
|
|
51
51
|
"@types/ms": "^0.7.34",
|
|
52
52
|
"@types/node": "latest",
|
|
53
53
|
"@types/source-map-support": "^0.5.10",
|
|
54
54
|
"@types/which": "^3.0.4",
|
|
55
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
56
|
-
"@typescript-eslint/type-utils": "^8.
|
|
57
|
-
"@typescript-eslint/utils": "^8.
|
|
55
|
+
"@typescript-eslint/rule-tester": "^8.18.1",
|
|
56
|
+
"@typescript-eslint/type-utils": "^8.18.1",
|
|
57
|
+
"@typescript-eslint/utils": "^8.18.1",
|
|
58
58
|
"azure-devops-node-api": "^14.1.0",
|
|
59
|
-
"c8": "^10.1.
|
|
59
|
+
"c8": "^10.1.3",
|
|
60
60
|
"chai": "^4.5.0",
|
|
61
61
|
"chalk": "^4.1.2",
|
|
62
62
|
"chokidar": "^3.6.0",
|
|
63
63
|
"diff": "^5.2.0",
|
|
64
|
-
"dprint": "^0.47.
|
|
64
|
+
"dprint": "^0.47.6",
|
|
65
65
|
"esbuild": "^0.24.0",
|
|
66
|
-
"eslint": "^9.
|
|
66
|
+
"eslint": "^9.17.0",
|
|
67
67
|
"eslint-formatter-autolinkable-stylish": "^1.4.0",
|
|
68
|
-
"eslint-plugin-regexp": "^2.
|
|
69
|
-
"fast-xml-parser": "^4.5.
|
|
68
|
+
"eslint-plugin-regexp": "^2.7.0",
|
|
69
|
+
"fast-xml-parser": "^4.5.1",
|
|
70
70
|
"glob": "^10.4.5",
|
|
71
|
-
"globals": "^15.
|
|
71
|
+
"globals": "^15.13.0",
|
|
72
72
|
"hereby": "^1.10.0",
|
|
73
73
|
"jsonc-parser": "^3.3.1",
|
|
74
|
-
"knip": "^5.
|
|
74
|
+
"knip": "^5.41.0",
|
|
75
75
|
"minimist": "^1.2.8",
|
|
76
|
-
"mocha": "^10.
|
|
76
|
+
"mocha": "^10.8.2",
|
|
77
77
|
"mocha-fivemat-progress-reporter": "^0.1.0",
|
|
78
|
-
"monocart-coverage-reports": "^2.11.
|
|
78
|
+
"monocart-coverage-reports": "^2.11.4",
|
|
79
79
|
"ms": "^2.1.3",
|
|
80
|
-
"playwright": "^1.
|
|
80
|
+
"playwright": "^1.49.1",
|
|
81
81
|
"source-map-support": "^0.5.21",
|
|
82
|
-
"tslib": "^2.
|
|
83
|
-
"typescript": "^5.
|
|
84
|
-
"typescript-eslint": "^8.
|
|
82
|
+
"tslib": "^2.8.1",
|
|
83
|
+
"typescript": "^5.7.2",
|
|
84
|
+
"typescript-eslint": "^8.18.1",
|
|
85
85
|
"which": "^3.0.1"
|
|
86
86
|
},
|
|
87
87
|
"overrides": {
|