typescript 5.5.0-dev.20240321 → 5.5.0-dev.20240323
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 +49 -46
- package/lib/typescript.js +54 -51
- package/package.json +10 -10
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-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20240323`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -2556,43 +2556,49 @@ function formatComparator(comparator) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
|
|
2558
2558
|
// src/compiler/performanceCore.ts
|
|
2559
|
-
function
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2559
|
+
function tryGetPerformance() {
|
|
2560
|
+
if (isNodeLikeSystem()) {
|
|
2561
|
+
try {
|
|
2562
|
+
const { performance: performance2 } = require("perf_hooks");
|
|
2563
|
+
return {
|
|
2564
|
+
shouldWriteNativeEvents: false,
|
|
2565
|
+
performance: performance2
|
|
2566
|
+
};
|
|
2567
|
+
} catch {
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
if (typeof performance === "object") {
|
|
2564
2571
|
return {
|
|
2565
|
-
// For now we always write native performance events when running in the browser. We may
|
|
2566
|
-
// make this conditional in the future if we find that native web performance hooks
|
|
2567
|
-
// in the browser also slow down compilation.
|
|
2568
2572
|
shouldWriteNativeEvents: true,
|
|
2569
|
-
performance
|
|
2570
|
-
PerformanceObserver
|
|
2573
|
+
performance
|
|
2571
2574
|
};
|
|
2572
2575
|
}
|
|
2576
|
+
return void 0;
|
|
2573
2577
|
}
|
|
2574
|
-
function
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
} catch {
|
|
2587
|
-
}
|
|
2578
|
+
function tryGetPerformanceHooks() {
|
|
2579
|
+
const p = tryGetPerformance();
|
|
2580
|
+
if (!p)
|
|
2581
|
+
return void 0;
|
|
2582
|
+
const { shouldWriteNativeEvents, performance: performance2 } = p;
|
|
2583
|
+
const hooks = {
|
|
2584
|
+
shouldWriteNativeEvents,
|
|
2585
|
+
performance: void 0,
|
|
2586
|
+
performanceTime: void 0
|
|
2587
|
+
};
|
|
2588
|
+
if (typeof performance2.timeOrigin === "number" && typeof performance2.now === "function") {
|
|
2589
|
+
hooks.performanceTime = performance2;
|
|
2588
2590
|
}
|
|
2591
|
+
if (hooks.performanceTime && typeof performance2.mark === "function" && typeof performance2.measure === "function" && typeof performance2.clearMarks === "function" && typeof performance2.clearMeasures === "function") {
|
|
2592
|
+
hooks.performance = performance2;
|
|
2593
|
+
}
|
|
2594
|
+
return hooks;
|
|
2589
2595
|
}
|
|
2590
|
-
var nativePerformanceHooks =
|
|
2591
|
-
var
|
|
2596
|
+
var nativePerformanceHooks = tryGetPerformanceHooks();
|
|
2597
|
+
var nativePerformanceTime = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performanceTime;
|
|
2592
2598
|
function tryGetNativePerformanceHooks() {
|
|
2593
2599
|
return nativePerformanceHooks;
|
|
2594
2600
|
}
|
|
2595
|
-
var timestamp =
|
|
2601
|
+
var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;
|
|
2596
2602
|
|
|
2597
2603
|
// src/compiler/perfLogger.ts
|
|
2598
2604
|
var etwModule;
|
|
@@ -2693,7 +2699,7 @@ function enable(system = sys) {
|
|
|
2693
2699
|
if (!enabled) {
|
|
2694
2700
|
enabled = true;
|
|
2695
2701
|
perfHooks || (perfHooks = tryGetNativePerformanceHooks());
|
|
2696
|
-
if (perfHooks) {
|
|
2702
|
+
if (perfHooks == null ? void 0 : perfHooks.performance) {
|
|
2697
2703
|
timeorigin = perfHooks.performance.timeOrigin;
|
|
2698
2704
|
if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) {
|
|
2699
2705
|
performanceImpl = perfHooks.performance;
|
|
@@ -43561,12 +43567,9 @@ function createTypeChecker(host) {
|
|
|
43561
43567
|
getExactOptionalProperties,
|
|
43562
43568
|
getAllPossiblePropertiesOfTypes,
|
|
43563
43569
|
getSuggestedSymbolForNonexistentProperty,
|
|
43564
|
-
getSuggestionForNonexistentProperty,
|
|
43565
43570
|
getSuggestedSymbolForNonexistentJSXAttribute,
|
|
43566
43571
|
getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
43567
|
-
getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
43568
43572
|
getSuggestedSymbolForNonexistentModule,
|
|
43569
|
-
getSuggestionForNonexistentExport,
|
|
43570
43573
|
getSuggestedSymbolForNonexistentClassMember,
|
|
43571
43574
|
getBaseConstraintOfType,
|
|
43572
43575
|
getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0,
|
|
@@ -47594,15 +47597,19 @@ function createTypeChecker(host) {
|
|
|
47594
47597
|
return true;
|
|
47595
47598
|
}
|
|
47596
47599
|
}
|
|
47597
|
-
function
|
|
47600
|
+
function getMeaningOfEntityNameReference(entityName) {
|
|
47598
47601
|
let meaning;
|
|
47599
47602
|
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
|
47600
47603
|
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
|
47601
|
-
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
|
47604
|
+
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {
|
|
47602
47605
|
meaning = 1920 /* Namespace */;
|
|
47603
47606
|
} else {
|
|
47604
47607
|
meaning = 788968 /* Type */;
|
|
47605
47608
|
}
|
|
47609
|
+
return meaning;
|
|
47610
|
+
}
|
|
47611
|
+
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
|
47612
|
+
const meaning = getMeaningOfEntityNameReference(entityName);
|
|
47606
47613
|
const firstIdentifier = getFirstIdentifier(entityName);
|
|
47607
47614
|
const symbol = resolveName(
|
|
47608
47615
|
enclosingDeclaration,
|
|
@@ -49709,9 +49716,10 @@ function createTypeChecker(host) {
|
|
|
49709
49716
|
introducesError = true;
|
|
49710
49717
|
return { introducesError, node };
|
|
49711
49718
|
}
|
|
49719
|
+
const meaning = getMeaningOfEntityNameReference(node);
|
|
49712
49720
|
const sym = resolveEntityName(
|
|
49713
49721
|
leftmost,
|
|
49714
|
-
|
|
49722
|
+
meaning,
|
|
49715
49723
|
/*ignoreErrors*/
|
|
49716
49724
|
true,
|
|
49717
49725
|
/*dontResolveAlias*/
|
|
@@ -49721,7 +49729,7 @@ function createTypeChecker(host) {
|
|
|
49721
49729
|
if (isSymbolAccessible(
|
|
49722
49730
|
sym,
|
|
49723
49731
|
context.enclosingDeclaration,
|
|
49724
|
-
|
|
49732
|
+
meaning,
|
|
49725
49733
|
/*shouldComputeAliasesToMakeVisible*/
|
|
49726
49734
|
false
|
|
49727
49735
|
).accessibility !== 0 /* Accessible */) {
|
|
@@ -49729,7 +49737,7 @@ function createTypeChecker(host) {
|
|
|
49729
49737
|
introducesError = true;
|
|
49730
49738
|
}
|
|
49731
49739
|
} else {
|
|
49732
|
-
context.tracker.trackSymbol(sym, context.enclosingDeclaration,
|
|
49740
|
+
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
|
49733
49741
|
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
|
49734
49742
|
}
|
|
49735
49743
|
if (isIdentifier(node)) {
|
|
@@ -57684,6 +57692,9 @@ function createTypeChecker(host) {
|
|
|
57684
57692
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
57685
57693
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
57686
57694
|
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
57695
|
+
} else if (typeSet.length >= 4) {
|
|
57696
|
+
const middle = Math.floor(typeSet.length / 2);
|
|
57697
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
57687
57698
|
} else {
|
|
57688
57699
|
if (!checkCrossProductUnion(typeSet)) {
|
|
57689
57700
|
return errorType;
|
|
@@ -70760,17 +70771,9 @@ function createTypeChecker(host) {
|
|
|
70760
70771
|
);
|
|
70761
70772
|
return result;
|
|
70762
70773
|
}
|
|
70763
|
-
function getSuggestionForNonexistentSymbol(location, outerName, meaning) {
|
|
70764
|
-
const symbolResult = getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning);
|
|
70765
|
-
return symbolResult && symbolName(symbolResult);
|
|
70766
|
-
}
|
|
70767
70774
|
function getSuggestedSymbolForNonexistentModule(name, targetModule) {
|
|
70768
70775
|
return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */);
|
|
70769
70776
|
}
|
|
70770
|
-
function getSuggestionForNonexistentExport(name, targetModule) {
|
|
70771
|
-
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule);
|
|
70772
|
-
return suggestion && symbolName(suggestion);
|
|
70773
|
-
}
|
|
70774
70777
|
function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) {
|
|
70775
70778
|
function hasProp(name) {
|
|
70776
70779
|
const prop = getPropertyOfObjectType(objectType, name);
|
|
@@ -113576,8 +113579,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
113576
113579
|
}
|
|
113577
113580
|
function writeDirectives(kind, directives) {
|
|
113578
113581
|
for (const directive of directives) {
|
|
113582
|
+
const resolutionMode = directive.resolutionMode ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
113579
113583
|
const preserve = directive.preserve ? `preserve="true" ` : "";
|
|
113580
|
-
const resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile == null ? void 0 : currentSourceFile.impliedNodeFormat) ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
113581
113584
|
writeComment(`/// <reference ${kind}="${directive.fileName}" ${resolutionMode}${preserve}/>`);
|
|
113582
113585
|
writeLine();
|
|
113583
113586
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -2326,7 +2326,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2326
2326
|
|
|
2327
2327
|
// src/compiler/corePublic.ts
|
|
2328
2328
|
var versionMajorMinor = "5.5";
|
|
2329
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2329
|
+
var version = `${versionMajorMinor}.0-dev.20240323`;
|
|
2330
2330
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2331
2331
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2332
2332
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -5262,43 +5262,49 @@ function formatComparator(comparator) {
|
|
|
5262
5262
|
}
|
|
5263
5263
|
|
|
5264
5264
|
// src/compiler/performanceCore.ts
|
|
5265
|
-
function
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5265
|
+
function tryGetPerformance() {
|
|
5266
|
+
if (isNodeLikeSystem()) {
|
|
5267
|
+
try {
|
|
5268
|
+
const { performance: performance2 } = require("perf_hooks");
|
|
5269
|
+
return {
|
|
5270
|
+
shouldWriteNativeEvents: false,
|
|
5271
|
+
performance: performance2
|
|
5272
|
+
};
|
|
5273
|
+
} catch {
|
|
5274
|
+
}
|
|
5275
|
+
}
|
|
5276
|
+
if (typeof performance === "object") {
|
|
5270
5277
|
return {
|
|
5271
|
-
// For now we always write native performance events when running in the browser. We may
|
|
5272
|
-
// make this conditional in the future if we find that native web performance hooks
|
|
5273
|
-
// in the browser also slow down compilation.
|
|
5274
5278
|
shouldWriteNativeEvents: true,
|
|
5275
|
-
performance
|
|
5276
|
-
PerformanceObserver
|
|
5279
|
+
performance
|
|
5277
5280
|
};
|
|
5278
5281
|
}
|
|
5282
|
+
return void 0;
|
|
5279
5283
|
}
|
|
5280
|
-
function
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5284
|
+
function tryGetPerformanceHooks() {
|
|
5285
|
+
const p = tryGetPerformance();
|
|
5286
|
+
if (!p)
|
|
5287
|
+
return void 0;
|
|
5288
|
+
const { shouldWriteNativeEvents, performance: performance2 } = p;
|
|
5289
|
+
const hooks = {
|
|
5290
|
+
shouldWriteNativeEvents,
|
|
5291
|
+
performance: void 0,
|
|
5292
|
+
performanceTime: void 0
|
|
5293
|
+
};
|
|
5294
|
+
if (typeof performance2.timeOrigin === "number" && typeof performance2.now === "function") {
|
|
5295
|
+
hooks.performanceTime = performance2;
|
|
5296
|
+
}
|
|
5297
|
+
if (hooks.performanceTime && typeof performance2.mark === "function" && typeof performance2.measure === "function" && typeof performance2.clearMarks === "function" && typeof performance2.clearMeasures === "function") {
|
|
5298
|
+
hooks.performance = performance2;
|
|
5294
5299
|
}
|
|
5300
|
+
return hooks;
|
|
5295
5301
|
}
|
|
5296
|
-
var nativePerformanceHooks =
|
|
5297
|
-
var
|
|
5302
|
+
var nativePerformanceHooks = tryGetPerformanceHooks();
|
|
5303
|
+
var nativePerformanceTime = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performanceTime;
|
|
5298
5304
|
function tryGetNativePerformanceHooks() {
|
|
5299
5305
|
return nativePerformanceHooks;
|
|
5300
5306
|
}
|
|
5301
|
-
var timestamp =
|
|
5307
|
+
var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;
|
|
5302
5308
|
|
|
5303
5309
|
// src/compiler/perfLogger.ts
|
|
5304
5310
|
var etwModule;
|
|
@@ -5418,7 +5424,7 @@ function enable(system = sys) {
|
|
|
5418
5424
|
if (!enabled) {
|
|
5419
5425
|
enabled = true;
|
|
5420
5426
|
perfHooks || (perfHooks = tryGetNativePerformanceHooks());
|
|
5421
|
-
if (perfHooks) {
|
|
5427
|
+
if (perfHooks == null ? void 0 : perfHooks.performance) {
|
|
5422
5428
|
timeorigin = perfHooks.performance.timeOrigin;
|
|
5423
5429
|
if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) {
|
|
5424
5430
|
performanceImpl = perfHooks.performance;
|
|
@@ -48323,12 +48329,9 @@ function createTypeChecker(host) {
|
|
|
48323
48329
|
getExactOptionalProperties,
|
|
48324
48330
|
getAllPossiblePropertiesOfTypes,
|
|
48325
48331
|
getSuggestedSymbolForNonexistentProperty,
|
|
48326
|
-
getSuggestionForNonexistentProperty,
|
|
48327
48332
|
getSuggestedSymbolForNonexistentJSXAttribute,
|
|
48328
48333
|
getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
48329
|
-
getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
48330
48334
|
getSuggestedSymbolForNonexistentModule,
|
|
48331
|
-
getSuggestionForNonexistentExport,
|
|
48332
48335
|
getSuggestedSymbolForNonexistentClassMember,
|
|
48333
48336
|
getBaseConstraintOfType,
|
|
48334
48337
|
getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0,
|
|
@@ -52356,15 +52359,19 @@ function createTypeChecker(host) {
|
|
|
52356
52359
|
return true;
|
|
52357
52360
|
}
|
|
52358
52361
|
}
|
|
52359
|
-
function
|
|
52362
|
+
function getMeaningOfEntityNameReference(entityName) {
|
|
52360
52363
|
let meaning;
|
|
52361
52364
|
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
|
52362
52365
|
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
|
52363
|
-
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
|
52366
|
+
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {
|
|
52364
52367
|
meaning = 1920 /* Namespace */;
|
|
52365
52368
|
} else {
|
|
52366
52369
|
meaning = 788968 /* Type */;
|
|
52367
52370
|
}
|
|
52371
|
+
return meaning;
|
|
52372
|
+
}
|
|
52373
|
+
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
|
52374
|
+
const meaning = getMeaningOfEntityNameReference(entityName);
|
|
52368
52375
|
const firstIdentifier = getFirstIdentifier(entityName);
|
|
52369
52376
|
const symbol = resolveName(
|
|
52370
52377
|
enclosingDeclaration,
|
|
@@ -54471,9 +54478,10 @@ function createTypeChecker(host) {
|
|
|
54471
54478
|
introducesError = true;
|
|
54472
54479
|
return { introducesError, node };
|
|
54473
54480
|
}
|
|
54481
|
+
const meaning = getMeaningOfEntityNameReference(node);
|
|
54474
54482
|
const sym = resolveEntityName(
|
|
54475
54483
|
leftmost,
|
|
54476
|
-
|
|
54484
|
+
meaning,
|
|
54477
54485
|
/*ignoreErrors*/
|
|
54478
54486
|
true,
|
|
54479
54487
|
/*dontResolveAlias*/
|
|
@@ -54483,7 +54491,7 @@ function createTypeChecker(host) {
|
|
|
54483
54491
|
if (isSymbolAccessible(
|
|
54484
54492
|
sym,
|
|
54485
54493
|
context.enclosingDeclaration,
|
|
54486
|
-
|
|
54494
|
+
meaning,
|
|
54487
54495
|
/*shouldComputeAliasesToMakeVisible*/
|
|
54488
54496
|
false
|
|
54489
54497
|
).accessibility !== 0 /* Accessible */) {
|
|
@@ -54491,7 +54499,7 @@ function createTypeChecker(host) {
|
|
|
54491
54499
|
introducesError = true;
|
|
54492
54500
|
}
|
|
54493
54501
|
} else {
|
|
54494
|
-
context.tracker.trackSymbol(sym, context.enclosingDeclaration,
|
|
54502
|
+
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
|
54495
54503
|
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
|
54496
54504
|
}
|
|
54497
54505
|
if (isIdentifier(node)) {
|
|
@@ -62446,6 +62454,9 @@ function createTypeChecker(host) {
|
|
|
62446
62454
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
62447
62455
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
62448
62456
|
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
62457
|
+
} else if (typeSet.length >= 4) {
|
|
62458
|
+
const middle = Math.floor(typeSet.length / 2);
|
|
62459
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
62449
62460
|
} else {
|
|
62450
62461
|
if (!checkCrossProductUnion(typeSet)) {
|
|
62451
62462
|
return errorType;
|
|
@@ -75522,17 +75533,9 @@ function createTypeChecker(host) {
|
|
|
75522
75533
|
);
|
|
75523
75534
|
return result;
|
|
75524
75535
|
}
|
|
75525
|
-
function getSuggestionForNonexistentSymbol(location, outerName, meaning) {
|
|
75526
|
-
const symbolResult = getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning);
|
|
75527
|
-
return symbolResult && symbolName(symbolResult);
|
|
75528
|
-
}
|
|
75529
75536
|
function getSuggestedSymbolForNonexistentModule(name, targetModule) {
|
|
75530
75537
|
return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */);
|
|
75531
75538
|
}
|
|
75532
|
-
function getSuggestionForNonexistentExport(name, targetModule) {
|
|
75533
|
-
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule);
|
|
75534
|
-
return suggestion && symbolName(suggestion);
|
|
75535
|
-
}
|
|
75536
75539
|
function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) {
|
|
75537
75540
|
function hasProp(name) {
|
|
75538
75541
|
const prop = getPropertyOfObjectType(objectType, name);
|
|
@@ -118536,8 +118539,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
118536
118539
|
}
|
|
118537
118540
|
function writeDirectives(kind, directives) {
|
|
118538
118541
|
for (const directive of directives) {
|
|
118542
|
+
const resolutionMode = directive.resolutionMode ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
118539
118543
|
const preserve = directive.preserve ? `preserve="true" ` : "";
|
|
118540
|
-
const resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile == null ? void 0 : currentSourceFile.impliedNodeFormat) ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
118541
118544
|
writeComment(`/// <reference ${kind}="${directive.fileName}" ${resolutionMode}${preserve}/>`);
|
|
118542
118545
|
writeLine();
|
|
118543
118546
|
}
|
|
@@ -131171,11 +131174,11 @@ var OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode2) => {
|
|
|
131171
131174
|
OrganizeImportsMode2["RemoveUnused"] = "RemoveUnused";
|
|
131172
131175
|
return OrganizeImportsMode2;
|
|
131173
131176
|
})(OrganizeImportsMode || {});
|
|
131174
|
-
var CompletionTriggerKind = /* @__PURE__ */ ((
|
|
131175
|
-
|
|
131176
|
-
|
|
131177
|
-
|
|
131178
|
-
return
|
|
131177
|
+
var CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind2) => {
|
|
131178
|
+
CompletionTriggerKind2[CompletionTriggerKind2["Invoked"] = 1] = "Invoked";
|
|
131179
|
+
CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
131180
|
+
CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
131181
|
+
return CompletionTriggerKind2;
|
|
131179
131182
|
})(CompletionTriggerKind || {});
|
|
131180
131183
|
var InlayHintKind = /* @__PURE__ */ ((InlayHintKind2) => {
|
|
131181
131184
|
InlayHintKind2["Type"] = "Type";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.5.0-dev.
|
|
5
|
+
"version": "5.5.0-dev.20240323",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@esfx/canceltoken": "^1.0.0",
|
|
43
43
|
"@octokit/rest": "^20.0.2",
|
|
44
|
-
"@types/chai": "^4.3.
|
|
44
|
+
"@types/chai": "^4.3.14",
|
|
45
45
|
"@types/microsoft__typescript-etw": "^0.1.3",
|
|
46
46
|
"@types/minimist": "^1.2.5",
|
|
47
47
|
"@types/mocha": "^10.0.6",
|
|
@@ -49,23 +49,23 @@
|
|
|
49
49
|
"@types/node": "latest",
|
|
50
50
|
"@types/source-map-support": "^0.5.10",
|
|
51
51
|
"@types/which": "^3.0.3",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
53
|
-
"@typescript-eslint/parser": "^7.
|
|
54
|
-
"@typescript-eslint/utils": "^7.
|
|
55
|
-
"azure-devops-node-api": "^12.
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
53
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
54
|
+
"@typescript-eslint/utils": "^7.3.1",
|
|
55
|
+
"azure-devops-node-api": "^12.5.0",
|
|
56
56
|
"c8": "^9.1.0",
|
|
57
57
|
"chai": "^4.4.1",
|
|
58
58
|
"chalk": "^4.1.2",
|
|
59
59
|
"chokidar": "^3.6.0",
|
|
60
60
|
"diff": "^5.2.0",
|
|
61
61
|
"dprint": "^0.45.0",
|
|
62
|
-
"esbuild": "^0.20.
|
|
62
|
+
"esbuild": "^0.20.2",
|
|
63
63
|
"eslint": "^8.57.0",
|
|
64
64
|
"eslint-formatter-autolinkable-stylish": "^1.3.0",
|
|
65
65
|
"eslint-plugin-local": "^4.2.1",
|
|
66
66
|
"eslint-plugin-no-null": "^1.0.2",
|
|
67
67
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
68
|
-
"fast-xml-parser": "^4.3.
|
|
68
|
+
"fast-xml-parser": "^4.3.6",
|
|
69
69
|
"glob": "^10.3.10",
|
|
70
70
|
"hereby": "^1.8.9",
|
|
71
71
|
"jsonc-parser": "^3.2.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"playwright": "^1.42.1",
|
|
78
78
|
"source-map-support": "^0.5.21",
|
|
79
79
|
"tslib": "^2.6.2",
|
|
80
|
-
"typescript": "^5.4.
|
|
80
|
+
"typescript": "^5.4.3",
|
|
81
81
|
"which": "^3.0.1"
|
|
82
82
|
},
|
|
83
83
|
"overrides": {
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"node": "20.1.0",
|
|
113
113
|
"npm": "8.19.4"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "3c637400da679883f720894e16c5625b9668f932"
|
|
116
116
|
}
|