typescript 5.1.0-dev.20230405 → 5.1.0-dev.20230406
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 +18 -14
- package/lib/tsserver.js +18 -14
- package/lib/tsserverlibrary.js +18 -14
- package/lib/typescript.js +18 -14
- package/lib/typingsInstaller.js +10 -4
- 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.1";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230406`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -29277,6 +29277,12 @@ var Parser;
|
|
|
29277
29277
|
if (languageVariant === 1 /* JSX */) {
|
|
29278
29278
|
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
29279
29279
|
/*inExpressionContext*/
|
|
29280
|
+
true,
|
|
29281
|
+
/*topInvalidNodePosition*/
|
|
29282
|
+
void 0,
|
|
29283
|
+
/*openingTag*/
|
|
29284
|
+
void 0,
|
|
29285
|
+
/*mustBeUnary*/
|
|
29280
29286
|
true
|
|
29281
29287
|
);
|
|
29282
29288
|
}
|
|
@@ -29381,7 +29387,7 @@ var Parser;
|
|
|
29381
29387
|
true
|
|
29382
29388
|
)), pos);
|
|
29383
29389
|
}
|
|
29384
|
-
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
|
|
29390
|
+
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {
|
|
29385
29391
|
const pos = getNodePos();
|
|
29386
29392
|
const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
|
|
29387
29393
|
let result;
|
|
@@ -29419,7 +29425,7 @@ var Parser;
|
|
|
29419
29425
|
Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */);
|
|
29420
29426
|
result = opening;
|
|
29421
29427
|
}
|
|
29422
|
-
if (inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
29428
|
+
if (!mustBeUnary && inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
29423
29429
|
const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition;
|
|
29424
29430
|
const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(
|
|
29425
29431
|
/*inExpressionContext*/
|
|
@@ -29452,7 +29458,7 @@ var Parser;
|
|
|
29452
29458
|
parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);
|
|
29453
29459
|
} else {
|
|
29454
29460
|
const tag = openingTag.tagName;
|
|
29455
|
-
const start = skipTrivia(sourceText, tag.pos);
|
|
29461
|
+
const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end);
|
|
29456
29462
|
parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));
|
|
29457
29463
|
}
|
|
29458
29464
|
return void 0;
|
|
@@ -89546,11 +89552,12 @@ function transformClassFields(context) {
|
|
|
89546
89552
|
return visitEachChild(node, visitor, context);
|
|
89547
89553
|
}
|
|
89548
89554
|
function visitArrayAssignmentElement(node) {
|
|
89549
|
-
|
|
89550
|
-
|
|
89551
|
-
|
|
89552
|
-
|
|
89553
|
-
|
|
89555
|
+
if (isArrayBindingOrAssignmentElement(node)) {
|
|
89556
|
+
if (isSpreadElement(node))
|
|
89557
|
+
return visitAssignmentRestElement(node);
|
|
89558
|
+
if (!isOmittedExpression(node))
|
|
89559
|
+
return visitAssignmentElement(node);
|
|
89560
|
+
}
|
|
89554
89561
|
return visitEachChild(node, visitor, context);
|
|
89555
89562
|
}
|
|
89556
89563
|
function visitAssignmentProperty(node) {
|
|
@@ -115618,9 +115625,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
115618
115625
|
if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {
|
|
115619
115626
|
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
|
|
115620
115627
|
}
|
|
115621
|
-
if (options.isolatedModules) {
|
|
115622
|
-
createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax");
|
|
115623
|
-
}
|
|
115624
115628
|
if (options.preserveValueImports) {
|
|
115625
115629
|
createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax");
|
|
115626
115630
|
}
|
|
@@ -118130,7 +118134,7 @@ function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLoo
|
|
|
118130
118134
|
return {
|
|
118131
118135
|
dir: rootDir,
|
|
118132
118136
|
dirPath: rootPath,
|
|
118133
|
-
nonRecursive:
|
|
118137
|
+
nonRecursive: true
|
|
118134
118138
|
};
|
|
118135
118139
|
}
|
|
118136
118140
|
}
|
|
@@ -118578,7 +118582,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118578
118582
|
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
118579
118583
|
}
|
|
118580
118584
|
if (dirPath === rootPath) {
|
|
118581
|
-
Debug.assert(
|
|
118585
|
+
Debug.assert(nonRecursive);
|
|
118582
118586
|
setAtRoot = true;
|
|
118583
118587
|
} else {
|
|
118584
118588
|
setDirectoryWatcher(dir, dirPath, nonRecursive);
|
package/lib/tsserver.js
CHANGED
|
@@ -2292,7 +2292,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2292
2292
|
|
|
2293
2293
|
// src/compiler/corePublic.ts
|
|
2294
2294
|
var versionMajorMinor = "5.1";
|
|
2295
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2295
|
+
var version = `${versionMajorMinor}.0-dev.20230406`;
|
|
2296
2296
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2297
2297
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2298
2298
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -33659,6 +33659,12 @@ var Parser;
|
|
|
33659
33659
|
if (languageVariant === 1 /* JSX */) {
|
|
33660
33660
|
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
33661
33661
|
/*inExpressionContext*/
|
|
33662
|
+
true,
|
|
33663
|
+
/*topInvalidNodePosition*/
|
|
33664
|
+
void 0,
|
|
33665
|
+
/*openingTag*/
|
|
33666
|
+
void 0,
|
|
33667
|
+
/*mustBeUnary*/
|
|
33662
33668
|
true
|
|
33663
33669
|
);
|
|
33664
33670
|
}
|
|
@@ -33763,7 +33769,7 @@ var Parser;
|
|
|
33763
33769
|
true
|
|
33764
33770
|
)), pos);
|
|
33765
33771
|
}
|
|
33766
|
-
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
|
|
33772
|
+
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {
|
|
33767
33773
|
const pos = getNodePos();
|
|
33768
33774
|
const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
|
|
33769
33775
|
let result;
|
|
@@ -33801,7 +33807,7 @@ var Parser;
|
|
|
33801
33807
|
Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */);
|
|
33802
33808
|
result = opening;
|
|
33803
33809
|
}
|
|
33804
|
-
if (inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
33810
|
+
if (!mustBeUnary && inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
33805
33811
|
const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition;
|
|
33806
33812
|
const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(
|
|
33807
33813
|
/*inExpressionContext*/
|
|
@@ -33834,7 +33840,7 @@ var Parser;
|
|
|
33834
33840
|
parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);
|
|
33835
33841
|
} else {
|
|
33836
33842
|
const tag = openingTag.tagName;
|
|
33837
|
-
const start2 = skipTrivia(sourceText, tag.pos);
|
|
33843
|
+
const start2 = Math.min(skipTrivia(sourceText, tag.pos), tag.end);
|
|
33838
33844
|
parseErrorAt(start2, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));
|
|
33839
33845
|
}
|
|
33840
33846
|
return void 0;
|
|
@@ -94365,11 +94371,12 @@ function transformClassFields(context) {
|
|
|
94365
94371
|
return visitEachChild(node, visitor, context);
|
|
94366
94372
|
}
|
|
94367
94373
|
function visitArrayAssignmentElement(node) {
|
|
94368
|
-
|
|
94369
|
-
|
|
94370
|
-
|
|
94371
|
-
|
|
94372
|
-
|
|
94374
|
+
if (isArrayBindingOrAssignmentElement(node)) {
|
|
94375
|
+
if (isSpreadElement(node))
|
|
94376
|
+
return visitAssignmentRestElement(node);
|
|
94377
|
+
if (!isOmittedExpression(node))
|
|
94378
|
+
return visitAssignmentElement(node);
|
|
94379
|
+
}
|
|
94373
94380
|
return visitEachChild(node, visitor, context);
|
|
94374
94381
|
}
|
|
94375
94382
|
function visitAssignmentProperty(node) {
|
|
@@ -120502,9 +120509,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
120502
120509
|
if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {
|
|
120503
120510
|
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
|
|
120504
120511
|
}
|
|
120505
|
-
if (options.isolatedModules) {
|
|
120506
|
-
createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax");
|
|
120507
|
-
}
|
|
120508
120512
|
if (options.preserveValueImports) {
|
|
120509
120513
|
createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax");
|
|
120510
120514
|
}
|
|
@@ -123046,7 +123050,7 @@ function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLoo
|
|
|
123046
123050
|
return {
|
|
123047
123051
|
dir: rootDir,
|
|
123048
123052
|
dirPath: rootPath,
|
|
123049
|
-
nonRecursive:
|
|
123053
|
+
nonRecursive: true
|
|
123050
123054
|
};
|
|
123051
123055
|
}
|
|
123052
123056
|
}
|
|
@@ -123494,7 +123498,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123494
123498
|
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
123495
123499
|
}
|
|
123496
123500
|
if (dirPath === rootPath) {
|
|
123497
|
-
Debug.assert(
|
|
123501
|
+
Debug.assert(nonRecursive);
|
|
123498
123502
|
setAtRoot = true;
|
|
123499
123503
|
} else {
|
|
123500
123504
|
setDirectoryWatcher(dir, dirPath, nonRecursive);
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230406`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -31763,6 +31763,12 @@ ${lanes.join("\n")}
|
|
|
31763
31763
|
if (languageVariant === 1 /* JSX */) {
|
|
31764
31764
|
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
31765
31765
|
/*inExpressionContext*/
|
|
31766
|
+
true,
|
|
31767
|
+
/*topInvalidNodePosition*/
|
|
31768
|
+
void 0,
|
|
31769
|
+
/*openingTag*/
|
|
31770
|
+
void 0,
|
|
31771
|
+
/*mustBeUnary*/
|
|
31766
31772
|
true
|
|
31767
31773
|
);
|
|
31768
31774
|
}
|
|
@@ -31867,7 +31873,7 @@ ${lanes.join("\n")}
|
|
|
31867
31873
|
true
|
|
31868
31874
|
)), pos);
|
|
31869
31875
|
}
|
|
31870
|
-
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
|
|
31876
|
+
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {
|
|
31871
31877
|
const pos = getNodePos();
|
|
31872
31878
|
const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
|
|
31873
31879
|
let result;
|
|
@@ -31905,7 +31911,7 @@ ${lanes.join("\n")}
|
|
|
31905
31911
|
Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */);
|
|
31906
31912
|
result = opening;
|
|
31907
31913
|
}
|
|
31908
|
-
if (inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
31914
|
+
if (!mustBeUnary && inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
31909
31915
|
const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition;
|
|
31910
31916
|
const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(
|
|
31911
31917
|
/*inExpressionContext*/
|
|
@@ -31938,7 +31944,7 @@ ${lanes.join("\n")}
|
|
|
31938
31944
|
parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);
|
|
31939
31945
|
} else {
|
|
31940
31946
|
const tag = openingTag.tagName;
|
|
31941
|
-
const start = skipTrivia(sourceText, tag.pos);
|
|
31947
|
+
const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end);
|
|
31942
31948
|
parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));
|
|
31943
31949
|
}
|
|
31944
31950
|
return void 0;
|
|
@@ -92342,11 +92348,12 @@ ${lanes.join("\n")}
|
|
|
92342
92348
|
return visitEachChild(node, visitor, context);
|
|
92343
92349
|
}
|
|
92344
92350
|
function visitArrayAssignmentElement(node) {
|
|
92345
|
-
|
|
92346
|
-
|
|
92347
|
-
|
|
92348
|
-
|
|
92349
|
-
|
|
92351
|
+
if (isArrayBindingOrAssignmentElement(node)) {
|
|
92352
|
+
if (isSpreadElement(node))
|
|
92353
|
+
return visitAssignmentRestElement(node);
|
|
92354
|
+
if (!isOmittedExpression(node))
|
|
92355
|
+
return visitAssignmentElement(node);
|
|
92356
|
+
}
|
|
92350
92357
|
return visitEachChild(node, visitor, context);
|
|
92351
92358
|
}
|
|
92352
92359
|
function visitAssignmentProperty(node) {
|
|
@@ -118512,9 +118519,6 @@ ${lanes.join("\n")}
|
|
|
118512
118519
|
if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {
|
|
118513
118520
|
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
|
|
118514
118521
|
}
|
|
118515
|
-
if (options.isolatedModules) {
|
|
118516
|
-
createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax");
|
|
118517
|
-
}
|
|
118518
118522
|
if (options.preserveValueImports) {
|
|
118519
118523
|
createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax");
|
|
118520
118524
|
}
|
|
@@ -121211,7 +121215,7 @@ ${lanes.join("\n")}
|
|
|
121211
121215
|
return {
|
|
121212
121216
|
dir: rootDir,
|
|
121213
121217
|
dirPath: rootPath,
|
|
121214
|
-
nonRecursive:
|
|
121218
|
+
nonRecursive: true
|
|
121215
121219
|
};
|
|
121216
121220
|
}
|
|
121217
121221
|
}
|
|
@@ -121659,7 +121663,7 @@ ${lanes.join("\n")}
|
|
|
121659
121663
|
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
121660
121664
|
}
|
|
121661
121665
|
if (dirPath === rootPath) {
|
|
121662
|
-
Debug.assert(
|
|
121666
|
+
Debug.assert(nonRecursive);
|
|
121663
121667
|
setAtRoot = true;
|
|
121664
121668
|
} else {
|
|
121665
121669
|
setDirectoryWatcher(dir, dirPath, nonRecursive);
|
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.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230406`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -31763,6 +31763,12 @@ ${lanes.join("\n")}
|
|
|
31763
31763
|
if (languageVariant === 1 /* JSX */) {
|
|
31764
31764
|
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
31765
31765
|
/*inExpressionContext*/
|
|
31766
|
+
true,
|
|
31767
|
+
/*topInvalidNodePosition*/
|
|
31768
|
+
void 0,
|
|
31769
|
+
/*openingTag*/
|
|
31770
|
+
void 0,
|
|
31771
|
+
/*mustBeUnary*/
|
|
31766
31772
|
true
|
|
31767
31773
|
);
|
|
31768
31774
|
}
|
|
@@ -31867,7 +31873,7 @@ ${lanes.join("\n")}
|
|
|
31867
31873
|
true
|
|
31868
31874
|
)), pos);
|
|
31869
31875
|
}
|
|
31870
|
-
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
|
|
31876
|
+
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {
|
|
31871
31877
|
const pos = getNodePos();
|
|
31872
31878
|
const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
|
|
31873
31879
|
let result;
|
|
@@ -31905,7 +31911,7 @@ ${lanes.join("\n")}
|
|
|
31905
31911
|
Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */);
|
|
31906
31912
|
result = opening;
|
|
31907
31913
|
}
|
|
31908
|
-
if (inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
31914
|
+
if (!mustBeUnary && inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
31909
31915
|
const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition;
|
|
31910
31916
|
const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(
|
|
31911
31917
|
/*inExpressionContext*/
|
|
@@ -31938,7 +31944,7 @@ ${lanes.join("\n")}
|
|
|
31938
31944
|
parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);
|
|
31939
31945
|
} else {
|
|
31940
31946
|
const tag = openingTag.tagName;
|
|
31941
|
-
const start = skipTrivia(sourceText, tag.pos);
|
|
31947
|
+
const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end);
|
|
31942
31948
|
parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));
|
|
31943
31949
|
}
|
|
31944
31950
|
return void 0;
|
|
@@ -92342,11 +92348,12 @@ ${lanes.join("\n")}
|
|
|
92342
92348
|
return visitEachChild(node, visitor, context);
|
|
92343
92349
|
}
|
|
92344
92350
|
function visitArrayAssignmentElement(node) {
|
|
92345
|
-
|
|
92346
|
-
|
|
92347
|
-
|
|
92348
|
-
|
|
92349
|
-
|
|
92351
|
+
if (isArrayBindingOrAssignmentElement(node)) {
|
|
92352
|
+
if (isSpreadElement(node))
|
|
92353
|
+
return visitAssignmentRestElement(node);
|
|
92354
|
+
if (!isOmittedExpression(node))
|
|
92355
|
+
return visitAssignmentElement(node);
|
|
92356
|
+
}
|
|
92350
92357
|
return visitEachChild(node, visitor, context);
|
|
92351
92358
|
}
|
|
92352
92359
|
function visitAssignmentProperty(node) {
|
|
@@ -118512,9 +118519,6 @@ ${lanes.join("\n")}
|
|
|
118512
118519
|
if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {
|
|
118513
118520
|
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
|
|
118514
118521
|
}
|
|
118515
|
-
if (options.isolatedModules) {
|
|
118516
|
-
createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax");
|
|
118517
|
-
}
|
|
118518
118522
|
if (options.preserveValueImports) {
|
|
118519
118523
|
createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax");
|
|
118520
118524
|
}
|
|
@@ -121211,7 +121215,7 @@ ${lanes.join("\n")}
|
|
|
121211
121215
|
return {
|
|
121212
121216
|
dir: rootDir,
|
|
121213
121217
|
dirPath: rootPath,
|
|
121214
|
-
nonRecursive:
|
|
121218
|
+
nonRecursive: true
|
|
121215
121219
|
};
|
|
121216
121220
|
}
|
|
121217
121221
|
}
|
|
@@ -121659,7 +121663,7 @@ ${lanes.join("\n")}
|
|
|
121659
121663
|
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
121660
121664
|
}
|
|
121661
121665
|
if (dirPath === rootPath) {
|
|
121662
|
-
Debug.assert(
|
|
121666
|
+
Debug.assert(nonRecursive);
|
|
121663
121667
|
setAtRoot = true;
|
|
121664
121668
|
} else {
|
|
121665
121669
|
setDirectoryWatcher(dir, dirPath, nonRecursive);
|
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.1";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230406`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -21340,6 +21340,12 @@ var Parser;
|
|
|
21340
21340
|
if (languageVariant === 1 /* JSX */) {
|
|
21341
21341
|
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
21342
21342
|
/*inExpressionContext*/
|
|
21343
|
+
true,
|
|
21344
|
+
/*topInvalidNodePosition*/
|
|
21345
|
+
void 0,
|
|
21346
|
+
/*openingTag*/
|
|
21347
|
+
void 0,
|
|
21348
|
+
/*mustBeUnary*/
|
|
21343
21349
|
true
|
|
21344
21350
|
);
|
|
21345
21351
|
}
|
|
@@ -21444,7 +21450,7 @@ var Parser;
|
|
|
21444
21450
|
true
|
|
21445
21451
|
)), pos);
|
|
21446
21452
|
}
|
|
21447
|
-
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
|
|
21453
|
+
function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) {
|
|
21448
21454
|
const pos = getNodePos();
|
|
21449
21455
|
const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
|
|
21450
21456
|
let result;
|
|
@@ -21482,7 +21488,7 @@ var Parser;
|
|
|
21482
21488
|
Debug.assert(opening.kind === 283 /* JsxSelfClosingElement */);
|
|
21483
21489
|
result = opening;
|
|
21484
21490
|
}
|
|
21485
|
-
if (inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
21491
|
+
if (!mustBeUnary && inExpressionContext && token() === 29 /* LessThanToken */) {
|
|
21486
21492
|
const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition;
|
|
21487
21493
|
const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment(
|
|
21488
21494
|
/*inExpressionContext*/
|
|
@@ -21515,7 +21521,7 @@ var Parser;
|
|
|
21515
21521
|
parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);
|
|
21516
21522
|
} else {
|
|
21517
21523
|
const tag = openingTag.tagName;
|
|
21518
|
-
const start = skipTrivia(sourceText, tag.pos);
|
|
21524
|
+
const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end);
|
|
21519
21525
|
parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName));
|
|
21520
21526
|
}
|
|
21521
21527
|
return void 0;
|
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.1.0-dev.
|
|
5
|
+
"version": "5.1.0-dev.20230406",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "14.21.1",
|
|
114
114
|
"npm": "8.19.3"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "68d8be4f1d89d94a543d93fcedad17f3e4ef297b"
|
|
117
117
|
}
|