typescript 5.5.0-dev.20240321 → 5.5.0-dev.20240322
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 +15 -18
- package/lib/typescript.js +20 -23
- 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.20240322`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -43561,12 +43561,9 @@ function createTypeChecker(host) {
|
|
|
43561
43561
|
getExactOptionalProperties,
|
|
43562
43562
|
getAllPossiblePropertiesOfTypes,
|
|
43563
43563
|
getSuggestedSymbolForNonexistentProperty,
|
|
43564
|
-
getSuggestionForNonexistentProperty,
|
|
43565
43564
|
getSuggestedSymbolForNonexistentJSXAttribute,
|
|
43566
43565
|
getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
43567
|
-
getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
43568
43566
|
getSuggestedSymbolForNonexistentModule,
|
|
43569
|
-
getSuggestionForNonexistentExport,
|
|
43570
43567
|
getSuggestedSymbolForNonexistentClassMember,
|
|
43571
43568
|
getBaseConstraintOfType,
|
|
43572
43569
|
getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0,
|
|
@@ -47594,15 +47591,19 @@ function createTypeChecker(host) {
|
|
|
47594
47591
|
return true;
|
|
47595
47592
|
}
|
|
47596
47593
|
}
|
|
47597
|
-
function
|
|
47594
|
+
function getMeaningOfEntityNameReference(entityName) {
|
|
47598
47595
|
let meaning;
|
|
47599
47596
|
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
|
47600
47597
|
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
|
47601
|
-
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
|
47598
|
+
} 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
47599
|
meaning = 1920 /* Namespace */;
|
|
47603
47600
|
} else {
|
|
47604
47601
|
meaning = 788968 /* Type */;
|
|
47605
47602
|
}
|
|
47603
|
+
return meaning;
|
|
47604
|
+
}
|
|
47605
|
+
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
|
47606
|
+
const meaning = getMeaningOfEntityNameReference(entityName);
|
|
47606
47607
|
const firstIdentifier = getFirstIdentifier(entityName);
|
|
47607
47608
|
const symbol = resolveName(
|
|
47608
47609
|
enclosingDeclaration,
|
|
@@ -49709,9 +49710,10 @@ function createTypeChecker(host) {
|
|
|
49709
49710
|
introducesError = true;
|
|
49710
49711
|
return { introducesError, node };
|
|
49711
49712
|
}
|
|
49713
|
+
const meaning = getMeaningOfEntityNameReference(node);
|
|
49712
49714
|
const sym = resolveEntityName(
|
|
49713
49715
|
leftmost,
|
|
49714
|
-
|
|
49716
|
+
meaning,
|
|
49715
49717
|
/*ignoreErrors*/
|
|
49716
49718
|
true,
|
|
49717
49719
|
/*dontResolveAlias*/
|
|
@@ -49721,7 +49723,7 @@ function createTypeChecker(host) {
|
|
|
49721
49723
|
if (isSymbolAccessible(
|
|
49722
49724
|
sym,
|
|
49723
49725
|
context.enclosingDeclaration,
|
|
49724
|
-
|
|
49726
|
+
meaning,
|
|
49725
49727
|
/*shouldComputeAliasesToMakeVisible*/
|
|
49726
49728
|
false
|
|
49727
49729
|
).accessibility !== 0 /* Accessible */) {
|
|
@@ -49729,7 +49731,7 @@ function createTypeChecker(host) {
|
|
|
49729
49731
|
introducesError = true;
|
|
49730
49732
|
}
|
|
49731
49733
|
} else {
|
|
49732
|
-
context.tracker.trackSymbol(sym, context.enclosingDeclaration,
|
|
49734
|
+
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
|
49733
49735
|
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
|
49734
49736
|
}
|
|
49735
49737
|
if (isIdentifier(node)) {
|
|
@@ -57684,6 +57686,9 @@ function createTypeChecker(host) {
|
|
|
57684
57686
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
57685
57687
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
57686
57688
|
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
57689
|
+
} else if (typeSet.length >= 4) {
|
|
57690
|
+
const middle = Math.floor(typeSet.length / 2);
|
|
57691
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
57687
57692
|
} else {
|
|
57688
57693
|
if (!checkCrossProductUnion(typeSet)) {
|
|
57689
57694
|
return errorType;
|
|
@@ -70760,17 +70765,9 @@ function createTypeChecker(host) {
|
|
|
70760
70765
|
);
|
|
70761
70766
|
return result;
|
|
70762
70767
|
}
|
|
70763
|
-
function getSuggestionForNonexistentSymbol(location, outerName, meaning) {
|
|
70764
|
-
const symbolResult = getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning);
|
|
70765
|
-
return symbolResult && symbolName(symbolResult);
|
|
70766
|
-
}
|
|
70767
70768
|
function getSuggestedSymbolForNonexistentModule(name, targetModule) {
|
|
70768
70769
|
return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */);
|
|
70769
70770
|
}
|
|
70770
|
-
function getSuggestionForNonexistentExport(name, targetModule) {
|
|
70771
|
-
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule);
|
|
70772
|
-
return suggestion && symbolName(suggestion);
|
|
70773
|
-
}
|
|
70774
70771
|
function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) {
|
|
70775
70772
|
function hasProp(name) {
|
|
70776
70773
|
const prop = getPropertyOfObjectType(objectType, name);
|
|
@@ -113576,8 +113573,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
113576
113573
|
}
|
|
113577
113574
|
function writeDirectives(kind, directives) {
|
|
113578
113575
|
for (const directive of directives) {
|
|
113576
|
+
const resolutionMode = directive.resolutionMode ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
113579
113577
|
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
113578
|
writeComment(`/// <reference ${kind}="${directive.fileName}" ${resolutionMode}${preserve}/>`);
|
|
113582
113579
|
writeLine();
|
|
113583
113580
|
}
|
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.20240322`;
|
|
2330
2330
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2331
2331
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2332
2332
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -48323,12 +48323,9 @@ function createTypeChecker(host) {
|
|
|
48323
48323
|
getExactOptionalProperties,
|
|
48324
48324
|
getAllPossiblePropertiesOfTypes,
|
|
48325
48325
|
getSuggestedSymbolForNonexistentProperty,
|
|
48326
|
-
getSuggestionForNonexistentProperty,
|
|
48327
48326
|
getSuggestedSymbolForNonexistentJSXAttribute,
|
|
48328
48327
|
getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
48329
|
-
getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning),
|
|
48330
48328
|
getSuggestedSymbolForNonexistentModule,
|
|
48331
|
-
getSuggestionForNonexistentExport,
|
|
48332
48329
|
getSuggestedSymbolForNonexistentClassMember,
|
|
48333
48330
|
getBaseConstraintOfType,
|
|
48334
48331
|
getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0,
|
|
@@ -52356,15 +52353,19 @@ function createTypeChecker(host) {
|
|
|
52356
52353
|
return true;
|
|
52357
52354
|
}
|
|
52358
52355
|
}
|
|
52359
|
-
function
|
|
52356
|
+
function getMeaningOfEntityNameReference(entityName) {
|
|
52360
52357
|
let meaning;
|
|
52361
52358
|
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
|
52362
52359
|
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
|
52363
|
-
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
|
52360
|
+
} 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
52361
|
meaning = 1920 /* Namespace */;
|
|
52365
52362
|
} else {
|
|
52366
52363
|
meaning = 788968 /* Type */;
|
|
52367
52364
|
}
|
|
52365
|
+
return meaning;
|
|
52366
|
+
}
|
|
52367
|
+
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
|
52368
|
+
const meaning = getMeaningOfEntityNameReference(entityName);
|
|
52368
52369
|
const firstIdentifier = getFirstIdentifier(entityName);
|
|
52369
52370
|
const symbol = resolveName(
|
|
52370
52371
|
enclosingDeclaration,
|
|
@@ -54471,9 +54472,10 @@ function createTypeChecker(host) {
|
|
|
54471
54472
|
introducesError = true;
|
|
54472
54473
|
return { introducesError, node };
|
|
54473
54474
|
}
|
|
54475
|
+
const meaning = getMeaningOfEntityNameReference(node);
|
|
54474
54476
|
const sym = resolveEntityName(
|
|
54475
54477
|
leftmost,
|
|
54476
|
-
|
|
54478
|
+
meaning,
|
|
54477
54479
|
/*ignoreErrors*/
|
|
54478
54480
|
true,
|
|
54479
54481
|
/*dontResolveAlias*/
|
|
@@ -54483,7 +54485,7 @@ function createTypeChecker(host) {
|
|
|
54483
54485
|
if (isSymbolAccessible(
|
|
54484
54486
|
sym,
|
|
54485
54487
|
context.enclosingDeclaration,
|
|
54486
|
-
|
|
54488
|
+
meaning,
|
|
54487
54489
|
/*shouldComputeAliasesToMakeVisible*/
|
|
54488
54490
|
false
|
|
54489
54491
|
).accessibility !== 0 /* Accessible */) {
|
|
@@ -54491,7 +54493,7 @@ function createTypeChecker(host) {
|
|
|
54491
54493
|
introducesError = true;
|
|
54492
54494
|
}
|
|
54493
54495
|
} else {
|
|
54494
|
-
context.tracker.trackSymbol(sym, context.enclosingDeclaration,
|
|
54496
|
+
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
|
54495
54497
|
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
|
54496
54498
|
}
|
|
54497
54499
|
if (isIdentifier(node)) {
|
|
@@ -62446,6 +62448,9 @@ function createTypeChecker(host) {
|
|
|
62446
62448
|
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
|
62447
62449
|
removeFromEach(typeSet, 65536 /* Null */);
|
|
62448
62450
|
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
|
62451
|
+
} else if (typeSet.length >= 4) {
|
|
62452
|
+
const middle = Math.floor(typeSet.length / 2);
|
|
62453
|
+
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
|
62449
62454
|
} else {
|
|
62450
62455
|
if (!checkCrossProductUnion(typeSet)) {
|
|
62451
62456
|
return errorType;
|
|
@@ -75522,17 +75527,9 @@ function createTypeChecker(host) {
|
|
|
75522
75527
|
);
|
|
75523
75528
|
return result;
|
|
75524
75529
|
}
|
|
75525
|
-
function getSuggestionForNonexistentSymbol(location, outerName, meaning) {
|
|
75526
|
-
const symbolResult = getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning);
|
|
75527
|
-
return symbolResult && symbolName(symbolResult);
|
|
75528
|
-
}
|
|
75529
75530
|
function getSuggestedSymbolForNonexistentModule(name, targetModule) {
|
|
75530
75531
|
return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */);
|
|
75531
75532
|
}
|
|
75532
|
-
function getSuggestionForNonexistentExport(name, targetModule) {
|
|
75533
|
-
const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule);
|
|
75534
|
-
return suggestion && symbolName(suggestion);
|
|
75535
|
-
}
|
|
75536
75533
|
function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) {
|
|
75537
75534
|
function hasProp(name) {
|
|
75538
75535
|
const prop = getPropertyOfObjectType(objectType, name);
|
|
@@ -118536,8 +118533,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
118536
118533
|
}
|
|
118537
118534
|
function writeDirectives(kind, directives) {
|
|
118538
118535
|
for (const directive of directives) {
|
|
118536
|
+
const resolutionMode = directive.resolutionMode ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}" ` : "";
|
|
118539
118537
|
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
118538
|
writeComment(`/// <reference ${kind}="${directive.fileName}" ${resolutionMode}${preserve}/>`);
|
|
118542
118539
|
writeLine();
|
|
118543
118540
|
}
|
|
@@ -131171,11 +131168,11 @@ var OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode2) => {
|
|
|
131171
131168
|
OrganizeImportsMode2["RemoveUnused"] = "RemoveUnused";
|
|
131172
131169
|
return OrganizeImportsMode2;
|
|
131173
131170
|
})(OrganizeImportsMode || {});
|
|
131174
|
-
var CompletionTriggerKind = /* @__PURE__ */ ((
|
|
131175
|
-
|
|
131176
|
-
|
|
131177
|
-
|
|
131178
|
-
return
|
|
131171
|
+
var CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind2) => {
|
|
131172
|
+
CompletionTriggerKind2[CompletionTriggerKind2["Invoked"] = 1] = "Invoked";
|
|
131173
|
+
CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
131174
|
+
CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
131175
|
+
return CompletionTriggerKind2;
|
|
131179
131176
|
})(CompletionTriggerKind || {});
|
|
131180
131177
|
var InlayHintKind = /* @__PURE__ */ ((InlayHintKind2) => {
|
|
131181
131178
|
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.20240322",
|
|
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": "b75261df74b01dbcb1be1499d66ec3b5647ff40e"
|
|
116
116
|
}
|