typescript 5.4.0-dev.20231128 → 5.4.0-dev.20231129
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 +25 -15
- package/lib/tsserver.js +66 -17
- package/lib/typescript.js +65 -17
- package/lib/typingsInstaller.js +22 -13
- package/package.json +2 -2
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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20231129`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -32696,18 +32696,7 @@ var Parser;
|
|
|
32696
32696
|
}
|
|
32697
32697
|
nextTokenJSDoc();
|
|
32698
32698
|
skipWhitespace();
|
|
32699
|
-
const
|
|
32700
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
32701
|
-
/*allowReservedWords*/
|
|
32702
|
-
true
|
|
32703
|
-
) : void 0;
|
|
32704
|
-
if (name) {
|
|
32705
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
32706
|
-
reScanHashToken();
|
|
32707
|
-
nextTokenJSDoc();
|
|
32708
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
32709
|
-
}
|
|
32710
|
-
}
|
|
32699
|
+
const name = parseJSDocLinkName();
|
|
32711
32700
|
const text = [];
|
|
32712
32701
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
32713
32702
|
text.push(scanner.getTokenText());
|
|
@@ -32716,6 +32705,26 @@ var Parser;
|
|
|
32716
32705
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
32717
32706
|
return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
|
|
32718
32707
|
}
|
|
32708
|
+
function parseJSDocLinkName() {
|
|
32709
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
32710
|
+
const pos = getNodePos();
|
|
32711
|
+
let name = parseIdentifierName();
|
|
32712
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
32713
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
32714
|
+
80 /* Identifier */,
|
|
32715
|
+
/*reportAtCurrentPosition*/
|
|
32716
|
+
false
|
|
32717
|
+
) : parseIdentifier()), pos);
|
|
32718
|
+
}
|
|
32719
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
32720
|
+
reScanHashToken();
|
|
32721
|
+
nextTokenJSDoc();
|
|
32722
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
32723
|
+
}
|
|
32724
|
+
return name;
|
|
32725
|
+
}
|
|
32726
|
+
return void 0;
|
|
32727
|
+
}
|
|
32719
32728
|
function parseJSDocLinkPrefix() {
|
|
32720
32729
|
skipWhitespaceOrAsterisk();
|
|
32721
32730
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
|
@@ -66901,14 +66910,15 @@ function createTypeChecker(host) {
|
|
|
66901
66910
|
if (declaration) {
|
|
66902
66911
|
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
66903
66912
|
const parent = declaration.parent.parent;
|
|
66904
|
-
|
|
66913
|
+
const rootDeclaration = getRootDeclaration(parent);
|
|
66914
|
+
if (rootDeclaration.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 169 /* Parameter */) {
|
|
66905
66915
|
const links = getNodeLinks(parent);
|
|
66906
66916
|
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
66907
66917
|
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
66908
66918
|
const parentType = getTypeForBindingElementParent(parent, 0 /* Normal */);
|
|
66909
66919
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
66910
66920
|
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
66911
|
-
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(
|
|
66921
|
+
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
66912
66922
|
const pattern = declaration.parent;
|
|
66913
66923
|
const narrowedType = getFlowTypeOfReference(
|
|
66914
66924
|
pattern,
|
package/lib/tsserver.js
CHANGED
|
@@ -545,6 +545,7 @@ __export(server_exports, {
|
|
|
545
545
|
escapeNonAsciiString: () => escapeNonAsciiString,
|
|
546
546
|
escapeSnippetText: () => escapeSnippetText,
|
|
547
547
|
escapeString: () => escapeString,
|
|
548
|
+
escapeTemplateSubstitution: () => escapeTemplateSubstitution,
|
|
548
549
|
every: () => every,
|
|
549
550
|
expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
|
|
550
551
|
explainFiles: () => explainFiles,
|
|
@@ -2331,7 +2332,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2331
2332
|
|
|
2332
2333
|
// src/compiler/corePublic.ts
|
|
2333
2334
|
var versionMajorMinor = "5.4";
|
|
2334
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2335
|
+
var version = `${versionMajorMinor}.0-dev.20231129`;
|
|
2335
2336
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2336
2337
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2337
2338
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -37122,18 +37123,7 @@ var Parser;
|
|
|
37122
37123
|
}
|
|
37123
37124
|
nextTokenJSDoc();
|
|
37124
37125
|
skipWhitespace();
|
|
37125
|
-
const
|
|
37126
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
37127
|
-
/*allowReservedWords*/
|
|
37128
|
-
true
|
|
37129
|
-
) : void 0;
|
|
37130
|
-
if (name) {
|
|
37131
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
37132
|
-
reScanHashToken();
|
|
37133
|
-
nextTokenJSDoc();
|
|
37134
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
37135
|
-
}
|
|
37136
|
-
}
|
|
37126
|
+
const name = parseJSDocLinkName();
|
|
37137
37127
|
const text = [];
|
|
37138
37128
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
37139
37129
|
text.push(scanner2.getTokenText());
|
|
@@ -37142,6 +37132,26 @@ var Parser;
|
|
|
37142
37132
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
37143
37133
|
return finishNode(create(name, text.join("")), start3, scanner2.getTokenEnd());
|
|
37144
37134
|
}
|
|
37135
|
+
function parseJSDocLinkName() {
|
|
37136
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
37137
|
+
const pos = getNodePos();
|
|
37138
|
+
let name = parseIdentifierName();
|
|
37139
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
37140
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
37141
|
+
80 /* Identifier */,
|
|
37142
|
+
/*reportAtCurrentPosition*/
|
|
37143
|
+
false
|
|
37144
|
+
) : parseIdentifier()), pos);
|
|
37145
|
+
}
|
|
37146
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
37147
|
+
reScanHashToken();
|
|
37148
|
+
nextTokenJSDoc();
|
|
37149
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
37150
|
+
}
|
|
37151
|
+
return name;
|
|
37152
|
+
}
|
|
37153
|
+
return void 0;
|
|
37154
|
+
}
|
|
37145
37155
|
function parseJSDocLinkPrefix() {
|
|
37146
37156
|
skipWhitespaceOrAsterisk();
|
|
37147
37157
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
|
@@ -71627,14 +71637,15 @@ function createTypeChecker(host) {
|
|
|
71627
71637
|
if (declaration) {
|
|
71628
71638
|
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
71629
71639
|
const parent2 = declaration.parent.parent;
|
|
71630
|
-
|
|
71640
|
+
const rootDeclaration = getRootDeclaration(parent2);
|
|
71641
|
+
if (rootDeclaration.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 169 /* Parameter */) {
|
|
71631
71642
|
const links = getNodeLinks(parent2);
|
|
71632
71643
|
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
71633
71644
|
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
71634
71645
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
71635
71646
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
71636
71647
|
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
71637
|
-
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(
|
|
71648
|
+
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
71638
71649
|
const pattern = declaration.parent;
|
|
71639
71650
|
const narrowedType = getFlowTypeOfReference(
|
|
71640
71651
|
pattern,
|
|
@@ -165843,6 +165854,28 @@ function provideInlayHints(context) {
|
|
|
165843
165854
|
parts.push({ text: tokenToString(node.operator) });
|
|
165844
165855
|
visitForDisplayParts(node.operand);
|
|
165845
165856
|
break;
|
|
165857
|
+
case 203 /* TemplateLiteralType */:
|
|
165858
|
+
Debug.assertNode(node, isTemplateLiteralTypeNode);
|
|
165859
|
+
visitForDisplayParts(node.head);
|
|
165860
|
+
node.templateSpans.forEach(visitForDisplayParts);
|
|
165861
|
+
break;
|
|
165862
|
+
case 16 /* TemplateHead */:
|
|
165863
|
+
Debug.assertNode(node, isTemplateHead);
|
|
165864
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165865
|
+
break;
|
|
165866
|
+
case 204 /* TemplateLiteralTypeSpan */:
|
|
165867
|
+
Debug.assertNode(node, isTemplateLiteralTypeSpan);
|
|
165868
|
+
visitForDisplayParts(node.type);
|
|
165869
|
+
visitForDisplayParts(node.literal);
|
|
165870
|
+
break;
|
|
165871
|
+
case 17 /* TemplateMiddle */:
|
|
165872
|
+
Debug.assertNode(node, isTemplateMiddle);
|
|
165873
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165874
|
+
break;
|
|
165875
|
+
case 18 /* TemplateTail */:
|
|
165876
|
+
Debug.assertNode(node, isTemplateTail);
|
|
165877
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165878
|
+
break;
|
|
165846
165879
|
case 197 /* ThisType */:
|
|
165847
165880
|
Debug.assertNode(node, isThisTypeNode);
|
|
165848
165881
|
parts.push({ text: "this" });
|
|
@@ -165870,8 +165903,22 @@ function provideInlayHints(context) {
|
|
|
165870
165903
|
});
|
|
165871
165904
|
}
|
|
165872
165905
|
function getLiteralText2(node) {
|
|
165873
|
-
|
|
165874
|
-
|
|
165906
|
+
switch (node.kind) {
|
|
165907
|
+
case 11 /* StringLiteral */:
|
|
165908
|
+
return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
|
|
165909
|
+
case 16 /* TemplateHead */:
|
|
165910
|
+
case 17 /* TemplateMiddle */:
|
|
165911
|
+
case 18 /* TemplateTail */: {
|
|
165912
|
+
const rawText = node.rawText ?? escapeTemplateSubstitution(escapeString(node.text, 96 /* backtick */));
|
|
165913
|
+
switch (node.kind) {
|
|
165914
|
+
case 16 /* TemplateHead */:
|
|
165915
|
+
return "`" + rawText + "${";
|
|
165916
|
+
case 17 /* TemplateMiddle */:
|
|
165917
|
+
return "}" + rawText + "${";
|
|
165918
|
+
case 18 /* TemplateTail */:
|
|
165919
|
+
return "}" + rawText + "`";
|
|
165920
|
+
}
|
|
165921
|
+
}
|
|
165875
165922
|
}
|
|
165876
165923
|
return node.text;
|
|
165877
165924
|
}
|
|
@@ -173436,6 +173483,7 @@ __export(ts_exports2, {
|
|
|
173436
173483
|
escapeNonAsciiString: () => escapeNonAsciiString,
|
|
173437
173484
|
escapeSnippetText: () => escapeSnippetText,
|
|
173438
173485
|
escapeString: () => escapeString,
|
|
173486
|
+
escapeTemplateSubstitution: () => escapeTemplateSubstitution,
|
|
173439
173487
|
every: () => every,
|
|
173440
173488
|
expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
|
|
173441
173489
|
explainFiles: () => explainFiles,
|
|
@@ -188227,6 +188275,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188227
188275
|
escapeNonAsciiString,
|
|
188228
188276
|
escapeSnippetText,
|
|
188229
188277
|
escapeString,
|
|
188278
|
+
escapeTemplateSubstitution,
|
|
188230
188279
|
every,
|
|
188231
188280
|
expandPreOrPostfixIncrementOrDecrementExpression,
|
|
188232
188281
|
explainFiles,
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20231129`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -35191,18 +35191,7 @@ ${lanes.join("\n")}
|
|
|
35191
35191
|
}
|
|
35192
35192
|
nextTokenJSDoc();
|
|
35193
35193
|
skipWhitespace();
|
|
35194
|
-
const
|
|
35195
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
35196
|
-
/*allowReservedWords*/
|
|
35197
|
-
true
|
|
35198
|
-
) : void 0;
|
|
35199
|
-
if (name) {
|
|
35200
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
35201
|
-
reScanHashToken();
|
|
35202
|
-
nextTokenJSDoc();
|
|
35203
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
35204
|
-
}
|
|
35205
|
-
}
|
|
35194
|
+
const name = parseJSDocLinkName();
|
|
35206
35195
|
const text = [];
|
|
35207
35196
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
35208
35197
|
text.push(scanner2.getTokenText());
|
|
@@ -35211,6 +35200,26 @@ ${lanes.join("\n")}
|
|
|
35211
35200
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
35212
35201
|
return finishNode(create(name, text.join("")), start2, scanner2.getTokenEnd());
|
|
35213
35202
|
}
|
|
35203
|
+
function parseJSDocLinkName() {
|
|
35204
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
35205
|
+
const pos = getNodePos();
|
|
35206
|
+
let name = parseIdentifierName();
|
|
35207
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
35208
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
35209
|
+
80 /* Identifier */,
|
|
35210
|
+
/*reportAtCurrentPosition*/
|
|
35211
|
+
false
|
|
35212
|
+
) : parseIdentifier()), pos);
|
|
35213
|
+
}
|
|
35214
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
35215
|
+
reScanHashToken();
|
|
35216
|
+
nextTokenJSDoc();
|
|
35217
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
35218
|
+
}
|
|
35219
|
+
return name;
|
|
35220
|
+
}
|
|
35221
|
+
return void 0;
|
|
35222
|
+
}
|
|
35214
35223
|
function parseJSDocLinkPrefix() {
|
|
35215
35224
|
skipWhitespaceOrAsterisk();
|
|
35216
35225
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
|
@@ -69391,14 +69400,15 @@ ${lanes.join("\n")}
|
|
|
69391
69400
|
if (declaration) {
|
|
69392
69401
|
if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
69393
69402
|
const parent2 = declaration.parent.parent;
|
|
69394
|
-
|
|
69403
|
+
const rootDeclaration = getRootDeclaration(parent2);
|
|
69404
|
+
if (rootDeclaration.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(rootDeclaration) & 6 /* Constant */ || rootDeclaration.kind === 169 /* Parameter */) {
|
|
69395
69405
|
const links = getNodeLinks(parent2);
|
|
69396
69406
|
if (!(links.flags & 4194304 /* InCheckIdentifier */)) {
|
|
69397
69407
|
links.flags |= 4194304 /* InCheckIdentifier */;
|
|
69398
69408
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
69399
69409
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
69400
69410
|
links.flags &= ~4194304 /* InCheckIdentifier */;
|
|
69401
|
-
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(
|
|
69411
|
+
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(rootDeclaration.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
69402
69412
|
const pattern = declaration.parent;
|
|
69403
69413
|
const narrowedType = getFlowTypeOfReference(
|
|
69404
69414
|
pattern,
|
|
@@ -165186,6 +165196,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165186
165196
|
parts.push({ text: tokenToString(node.operator) });
|
|
165187
165197
|
visitForDisplayParts(node.operand);
|
|
165188
165198
|
break;
|
|
165199
|
+
case 203 /* TemplateLiteralType */:
|
|
165200
|
+
Debug.assertNode(node, isTemplateLiteralTypeNode);
|
|
165201
|
+
visitForDisplayParts(node.head);
|
|
165202
|
+
node.templateSpans.forEach(visitForDisplayParts);
|
|
165203
|
+
break;
|
|
165204
|
+
case 16 /* TemplateHead */:
|
|
165205
|
+
Debug.assertNode(node, isTemplateHead);
|
|
165206
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165207
|
+
break;
|
|
165208
|
+
case 204 /* TemplateLiteralTypeSpan */:
|
|
165209
|
+
Debug.assertNode(node, isTemplateLiteralTypeSpan);
|
|
165210
|
+
visitForDisplayParts(node.type);
|
|
165211
|
+
visitForDisplayParts(node.literal);
|
|
165212
|
+
break;
|
|
165213
|
+
case 17 /* TemplateMiddle */:
|
|
165214
|
+
Debug.assertNode(node, isTemplateMiddle);
|
|
165215
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165216
|
+
break;
|
|
165217
|
+
case 18 /* TemplateTail */:
|
|
165218
|
+
Debug.assertNode(node, isTemplateTail);
|
|
165219
|
+
parts.push({ text: getLiteralText2(node) });
|
|
165220
|
+
break;
|
|
165189
165221
|
case 197 /* ThisType */:
|
|
165190
165222
|
Debug.assertNode(node, isThisTypeNode);
|
|
165191
165223
|
parts.push({ text: "this" });
|
|
@@ -165213,8 +165245,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
165213
165245
|
});
|
|
165214
165246
|
}
|
|
165215
165247
|
function getLiteralText2(node) {
|
|
165216
|
-
|
|
165217
|
-
|
|
165248
|
+
switch (node.kind) {
|
|
165249
|
+
case 11 /* StringLiteral */:
|
|
165250
|
+
return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
|
|
165251
|
+
case 16 /* TemplateHead */:
|
|
165252
|
+
case 17 /* TemplateMiddle */:
|
|
165253
|
+
case 18 /* TemplateTail */: {
|
|
165254
|
+
const rawText = node.rawText ?? escapeTemplateSubstitution(escapeString(node.text, 96 /* backtick */));
|
|
165255
|
+
switch (node.kind) {
|
|
165256
|
+
case 16 /* TemplateHead */:
|
|
165257
|
+
return "`" + rawText + "${";
|
|
165258
|
+
case 17 /* TemplateMiddle */:
|
|
165259
|
+
return "}" + rawText + "${";
|
|
165260
|
+
case 18 /* TemplateTail */:
|
|
165261
|
+
return "}" + rawText + "`";
|
|
165262
|
+
}
|
|
165263
|
+
}
|
|
165218
165264
|
}
|
|
165219
165265
|
return node.text;
|
|
165220
165266
|
}
|
|
@@ -184995,6 +185041,7 @@ ${e.message}`;
|
|
|
184995
185041
|
escapeNonAsciiString: () => escapeNonAsciiString,
|
|
184996
185042
|
escapeSnippetText: () => escapeSnippetText,
|
|
184997
185043
|
escapeString: () => escapeString,
|
|
185044
|
+
escapeTemplateSubstitution: () => escapeTemplateSubstitution,
|
|
184998
185045
|
every: () => every,
|
|
184999
185046
|
expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
|
|
185000
185047
|
explainFiles: () => explainFiles,
|
|
@@ -187407,6 +187454,7 @@ ${e.message}`;
|
|
|
187407
187454
|
escapeNonAsciiString: () => escapeNonAsciiString,
|
|
187408
187455
|
escapeSnippetText: () => escapeSnippetText,
|
|
187409
187456
|
escapeString: () => escapeString,
|
|
187457
|
+
escapeTemplateSubstitution: () => escapeTemplateSubstitution,
|
|
187410
187458
|
every: () => every,
|
|
187411
187459
|
expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
|
|
187412
187460
|
explainFiles: () => explainFiles,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231129`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -24510,18 +24510,7 @@ var Parser;
|
|
|
24510
24510
|
}
|
|
24511
24511
|
nextTokenJSDoc();
|
|
24512
24512
|
skipWhitespace();
|
|
24513
|
-
const
|
|
24514
|
-
let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
|
|
24515
|
-
/*allowReservedWords*/
|
|
24516
|
-
true
|
|
24517
|
-
) : void 0;
|
|
24518
|
-
if (name) {
|
|
24519
|
-
while (token() === 81 /* PrivateIdentifier */) {
|
|
24520
|
-
reScanHashToken();
|
|
24521
|
-
nextTokenJSDoc();
|
|
24522
|
-
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
|
|
24523
|
-
}
|
|
24524
|
-
}
|
|
24513
|
+
const name = parseJSDocLinkName();
|
|
24525
24514
|
const text = [];
|
|
24526
24515
|
while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
|
|
24527
24516
|
text.push(scanner.getTokenText());
|
|
@@ -24530,6 +24519,26 @@ var Parser;
|
|
|
24530
24519
|
const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
|
|
24531
24520
|
return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
|
|
24532
24521
|
}
|
|
24522
|
+
function parseJSDocLinkName() {
|
|
24523
|
+
if (tokenIsIdentifierOrKeyword(token())) {
|
|
24524
|
+
const pos = getNodePos();
|
|
24525
|
+
let name = parseIdentifierName();
|
|
24526
|
+
while (parseOptional(25 /* DotToken */)) {
|
|
24527
|
+
name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
|
|
24528
|
+
80 /* Identifier */,
|
|
24529
|
+
/*reportAtCurrentPosition*/
|
|
24530
|
+
false
|
|
24531
|
+
) : parseIdentifier()), pos);
|
|
24532
|
+
}
|
|
24533
|
+
while (token() === 81 /* PrivateIdentifier */) {
|
|
24534
|
+
reScanHashToken();
|
|
24535
|
+
nextTokenJSDoc();
|
|
24536
|
+
name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
|
|
24537
|
+
}
|
|
24538
|
+
return name;
|
|
24539
|
+
}
|
|
24540
|
+
return void 0;
|
|
24541
|
+
}
|
|
24533
24542
|
function parseJSDocLinkPrefix() {
|
|
24534
24543
|
skipWhitespaceOrAsterisk();
|
|
24535
24544
|
if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
|
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.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231129",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "2869579b2cad770ae20617e4148741c2ce35ffdc"
|
|
118
118
|
}
|