typescript 4.6.2-insiders.20220225 → 4.6.4
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/lib.es2022.object.d.ts +1 -1
- package/lib/tsc.js +3 -5
- package/lib/tsserver.js +44 -21
- package/lib/tsserverlibrary.js +44 -21
- package/lib/typescript.js +44 -21
- package/lib/typescriptServices.js +44 -21
- package/lib/typingsInstaller.js +3 -13
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = "
|
|
72
|
+
ts.version = "4.6.4";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -25262,9 +25262,7 @@ var ts;
|
|
|
25262
25262
|
return;
|
|
25263
25263
|
}
|
|
25264
25264
|
if (initializer) {
|
|
25265
|
-
|
|
25266
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25267
|
-
}
|
|
25265
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
|
|
25268
25266
|
return;
|
|
25269
25267
|
}
|
|
25270
25268
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -96226,7 +96224,7 @@ var ts;
|
|
|
96226
96224
|
return resolvedRef;
|
|
96227
96225
|
}
|
|
96228
96226
|
function verifyCompilerOptions() {
|
|
96229
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
96227
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
96230
96228
|
if (!isNightly) {
|
|
96231
96229
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
96232
96230
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = "
|
|
103
|
+
ts.version = "4.6.4";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -31354,18 +31354,8 @@ var ts;
|
|
|
31354
31354
|
if (tryParseSemicolon()) {
|
|
31355
31355
|
return;
|
|
31356
31356
|
}
|
|
31357
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31358
|
-
// we generally know there was an error already reported in the initializer...
|
|
31359
|
-
// class Example { a = new Map([), ) }
|
|
31360
|
-
// ~
|
|
31361
31357
|
if (initializer) {
|
|
31362
|
-
|
|
31363
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31364
|
-
// class Example { a = 0 {} }
|
|
31365
|
-
// ~
|
|
31366
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31367
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31368
|
-
}
|
|
31358
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31369
31359
|
return;
|
|
31370
31360
|
}
|
|
31371
31361
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -116573,7 +116563,7 @@ var ts;
|
|
|
116573
116563
|
return resolvedRef;
|
|
116574
116564
|
}
|
|
116575
116565
|
function verifyCompilerOptions() {
|
|
116576
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
116566
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
116577
116567
|
if (!isNightly) {
|
|
116578
116568
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
116579
116569
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
|
@@ -124974,12 +124964,8 @@ var ts;
|
|
|
124974
124964
|
}
|
|
124975
124965
|
}
|
|
124976
124966
|
ts.findNextToken = findNextToken;
|
|
124977
|
-
/**
|
|
124978
|
-
* Finds the rightmost token satisfying `token.end <= position`,
|
|
124979
|
-
* excluding `JsxText` tokens containing only whitespace.
|
|
124980
|
-
*/
|
|
124981
124967
|
function findPrecedingToken(position, sourceFile, startNode, excludeJsdoc) {
|
|
124982
|
-
var result = find(startNode || sourceFile);
|
|
124968
|
+
var result = find((startNode || sourceFile));
|
|
124983
124969
|
ts.Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));
|
|
124984
124970
|
return result;
|
|
124985
124971
|
function find(n) {
|
|
@@ -140014,6 +140000,41 @@ var ts;
|
|
|
140014
140000
|
if (ts.scanner.getToken() === 1 /* EndOfFileToken */) {
|
|
140015
140001
|
break;
|
|
140016
140002
|
}
|
|
140003
|
+
if (ts.scanner.getToken() === 15 /* TemplateHead */) {
|
|
140004
|
+
var stack = [ts.scanner.getToken()];
|
|
140005
|
+
var token = ts.scanner.scan();
|
|
140006
|
+
loop: while (ts.length(stack)) {
|
|
140007
|
+
switch (token) {
|
|
140008
|
+
case 1 /* EndOfFileToken */:
|
|
140009
|
+
break loop;
|
|
140010
|
+
case 100 /* ImportKeyword */:
|
|
140011
|
+
tryConsumeImport();
|
|
140012
|
+
break;
|
|
140013
|
+
case 15 /* TemplateHead */:
|
|
140014
|
+
stack.push(token);
|
|
140015
|
+
break;
|
|
140016
|
+
case 18 /* OpenBraceToken */:
|
|
140017
|
+
if (ts.length(stack)) {
|
|
140018
|
+
stack.push(token);
|
|
140019
|
+
}
|
|
140020
|
+
break;
|
|
140021
|
+
case 19 /* CloseBraceToken */:
|
|
140022
|
+
if (ts.length(stack)) {
|
|
140023
|
+
if (ts.lastOrUndefined(stack) === 15 /* TemplateHead */) {
|
|
140024
|
+
if (ts.scanner.reScanTemplateToken(/* isTaggedTemplate */ false) === 17 /* TemplateTail */) {
|
|
140025
|
+
stack.pop();
|
|
140026
|
+
}
|
|
140027
|
+
}
|
|
140028
|
+
else {
|
|
140029
|
+
stack.pop();
|
|
140030
|
+
}
|
|
140031
|
+
}
|
|
140032
|
+
break;
|
|
140033
|
+
}
|
|
140034
|
+
token = ts.scanner.scan();
|
|
140035
|
+
}
|
|
140036
|
+
nextToken();
|
|
140037
|
+
}
|
|
140017
140038
|
// check if at least one of alternative have moved scanner forward
|
|
140018
140039
|
if (tryConsumeDeclare() ||
|
|
140019
140040
|
tryConsumeImport() ||
|
|
@@ -144036,6 +144057,7 @@ var ts;
|
|
|
144036
144057
|
return formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end, function (scanner) { return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options), getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile), scanner, formatContext, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile); });
|
|
144037
144058
|
}
|
|
144038
144059
|
function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, _a, requestKind, rangeContainsError, sourceFile) {
|
|
144060
|
+
var _b;
|
|
144039
144061
|
var options = _a.options, getRules = _a.getRules, host = _a.host;
|
|
144040
144062
|
// formatting context is used by rules provider
|
|
144041
144063
|
var formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
|
|
@@ -144067,11 +144089,12 @@ var ts;
|
|
|
144067
144089
|
}
|
|
144068
144090
|
}
|
|
144069
144091
|
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
144070
|
-
var
|
|
144092
|
+
var tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
144071
144093
|
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
144072
144094
|
undefined;
|
|
144073
|
-
if (
|
|
144074
|
-
|
|
144095
|
+
if (tokenInfo) {
|
|
144096
|
+
var parent = ((_b = ts.findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) === null || _b === void 0 ? void 0 : _b.parent) || previousParent;
|
|
144097
|
+
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
144075
144098
|
/*dynamicIndentation*/ undefined);
|
|
144076
144099
|
}
|
|
144077
144100
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.6.4";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31548,18 +31548,8 @@ var ts;
|
|
|
31548
31548
|
if (tryParseSemicolon()) {
|
|
31549
31549
|
return;
|
|
31550
31550
|
}
|
|
31551
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31552
|
-
// we generally know there was an error already reported in the initializer...
|
|
31553
|
-
// class Example { a = new Map([), ) }
|
|
31554
|
-
// ~
|
|
31555
31551
|
if (initializer) {
|
|
31556
|
-
|
|
31557
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31558
|
-
// class Example { a = 0 {} }
|
|
31559
|
-
// ~
|
|
31560
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31561
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31562
|
-
}
|
|
31552
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31563
31553
|
return;
|
|
31564
31554
|
}
|
|
31565
31555
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -116767,7 +116757,7 @@ var ts;
|
|
|
116767
116757
|
return resolvedRef;
|
|
116768
116758
|
}
|
|
116769
116759
|
function verifyCompilerOptions() {
|
|
116770
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
116760
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
116771
116761
|
if (!isNightly) {
|
|
116772
116762
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
116773
116763
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
|
@@ -125585,12 +125575,8 @@ var ts;
|
|
|
125585
125575
|
}
|
|
125586
125576
|
}
|
|
125587
125577
|
ts.findNextToken = findNextToken;
|
|
125588
|
-
/**
|
|
125589
|
-
* Finds the rightmost token satisfying `token.end <= position`,
|
|
125590
|
-
* excluding `JsxText` tokens containing only whitespace.
|
|
125591
|
-
*/
|
|
125592
125578
|
function findPrecedingToken(position, sourceFile, startNode, excludeJsdoc) {
|
|
125593
|
-
var result = find(startNode || sourceFile);
|
|
125579
|
+
var result = find((startNode || sourceFile));
|
|
125594
125580
|
ts.Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));
|
|
125595
125581
|
return result;
|
|
125596
125582
|
function find(n) {
|
|
@@ -140625,6 +140611,41 @@ var ts;
|
|
|
140625
140611
|
if (ts.scanner.getToken() === 1 /* EndOfFileToken */) {
|
|
140626
140612
|
break;
|
|
140627
140613
|
}
|
|
140614
|
+
if (ts.scanner.getToken() === 15 /* TemplateHead */) {
|
|
140615
|
+
var stack = [ts.scanner.getToken()];
|
|
140616
|
+
var token = ts.scanner.scan();
|
|
140617
|
+
loop: while (ts.length(stack)) {
|
|
140618
|
+
switch (token) {
|
|
140619
|
+
case 1 /* EndOfFileToken */:
|
|
140620
|
+
break loop;
|
|
140621
|
+
case 100 /* ImportKeyword */:
|
|
140622
|
+
tryConsumeImport();
|
|
140623
|
+
break;
|
|
140624
|
+
case 15 /* TemplateHead */:
|
|
140625
|
+
stack.push(token);
|
|
140626
|
+
break;
|
|
140627
|
+
case 18 /* OpenBraceToken */:
|
|
140628
|
+
if (ts.length(stack)) {
|
|
140629
|
+
stack.push(token);
|
|
140630
|
+
}
|
|
140631
|
+
break;
|
|
140632
|
+
case 19 /* CloseBraceToken */:
|
|
140633
|
+
if (ts.length(stack)) {
|
|
140634
|
+
if (ts.lastOrUndefined(stack) === 15 /* TemplateHead */) {
|
|
140635
|
+
if (ts.scanner.reScanTemplateToken(/* isTaggedTemplate */ false) === 17 /* TemplateTail */) {
|
|
140636
|
+
stack.pop();
|
|
140637
|
+
}
|
|
140638
|
+
}
|
|
140639
|
+
else {
|
|
140640
|
+
stack.pop();
|
|
140641
|
+
}
|
|
140642
|
+
}
|
|
140643
|
+
break;
|
|
140644
|
+
}
|
|
140645
|
+
token = ts.scanner.scan();
|
|
140646
|
+
}
|
|
140647
|
+
nextToken();
|
|
140648
|
+
}
|
|
140628
140649
|
// check if at least one of alternative have moved scanner forward
|
|
140629
140650
|
if (tryConsumeDeclare() ||
|
|
140630
140651
|
tryConsumeImport() ||
|
|
@@ -144647,6 +144668,7 @@ var ts;
|
|
|
144647
144668
|
return formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end, function (scanner) { return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options), getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile), scanner, formatContext, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile); });
|
|
144648
144669
|
}
|
|
144649
144670
|
function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, _a, requestKind, rangeContainsError, sourceFile) {
|
|
144671
|
+
var _b;
|
|
144650
144672
|
var options = _a.options, getRules = _a.getRules, host = _a.host;
|
|
144651
144673
|
// formatting context is used by rules provider
|
|
144652
144674
|
var formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
|
|
@@ -144678,11 +144700,12 @@ var ts;
|
|
|
144678
144700
|
}
|
|
144679
144701
|
}
|
|
144680
144702
|
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
144681
|
-
var
|
|
144703
|
+
var tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
144682
144704
|
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
144683
144705
|
undefined;
|
|
144684
|
-
if (
|
|
144685
|
-
|
|
144706
|
+
if (tokenInfo) {
|
|
144707
|
+
var parent = ((_b = ts.findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) === null || _b === void 0 ? void 0 : _b.parent) || previousParent;
|
|
144708
|
+
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
144686
144709
|
/*dynamicIndentation*/ undefined);
|
|
144687
144710
|
}
|
|
144688
144711
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.6.4";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31548,18 +31548,8 @@ var ts;
|
|
|
31548
31548
|
if (tryParseSemicolon()) {
|
|
31549
31549
|
return;
|
|
31550
31550
|
}
|
|
31551
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31552
|
-
// we generally know there was an error already reported in the initializer...
|
|
31553
|
-
// class Example { a = new Map([), ) }
|
|
31554
|
-
// ~
|
|
31555
31551
|
if (initializer) {
|
|
31556
|
-
|
|
31557
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31558
|
-
// class Example { a = 0 {} }
|
|
31559
|
-
// ~
|
|
31560
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31561
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31562
|
-
}
|
|
31552
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31563
31553
|
return;
|
|
31564
31554
|
}
|
|
31565
31555
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -116767,7 +116757,7 @@ var ts;
|
|
|
116767
116757
|
return resolvedRef;
|
|
116768
116758
|
}
|
|
116769
116759
|
function verifyCompilerOptions() {
|
|
116770
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
116760
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
116771
116761
|
if (!isNightly) {
|
|
116772
116762
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
116773
116763
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
|
@@ -125585,12 +125575,8 @@ var ts;
|
|
|
125585
125575
|
}
|
|
125586
125576
|
}
|
|
125587
125577
|
ts.findNextToken = findNextToken;
|
|
125588
|
-
/**
|
|
125589
|
-
* Finds the rightmost token satisfying `token.end <= position`,
|
|
125590
|
-
* excluding `JsxText` tokens containing only whitespace.
|
|
125591
|
-
*/
|
|
125592
125578
|
function findPrecedingToken(position, sourceFile, startNode, excludeJsdoc) {
|
|
125593
|
-
var result = find(startNode || sourceFile);
|
|
125579
|
+
var result = find((startNode || sourceFile));
|
|
125594
125580
|
ts.Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));
|
|
125595
125581
|
return result;
|
|
125596
125582
|
function find(n) {
|
|
@@ -140625,6 +140611,41 @@ var ts;
|
|
|
140625
140611
|
if (ts.scanner.getToken() === 1 /* EndOfFileToken */) {
|
|
140626
140612
|
break;
|
|
140627
140613
|
}
|
|
140614
|
+
if (ts.scanner.getToken() === 15 /* TemplateHead */) {
|
|
140615
|
+
var stack = [ts.scanner.getToken()];
|
|
140616
|
+
var token = ts.scanner.scan();
|
|
140617
|
+
loop: while (ts.length(stack)) {
|
|
140618
|
+
switch (token) {
|
|
140619
|
+
case 1 /* EndOfFileToken */:
|
|
140620
|
+
break loop;
|
|
140621
|
+
case 100 /* ImportKeyword */:
|
|
140622
|
+
tryConsumeImport();
|
|
140623
|
+
break;
|
|
140624
|
+
case 15 /* TemplateHead */:
|
|
140625
|
+
stack.push(token);
|
|
140626
|
+
break;
|
|
140627
|
+
case 18 /* OpenBraceToken */:
|
|
140628
|
+
if (ts.length(stack)) {
|
|
140629
|
+
stack.push(token);
|
|
140630
|
+
}
|
|
140631
|
+
break;
|
|
140632
|
+
case 19 /* CloseBraceToken */:
|
|
140633
|
+
if (ts.length(stack)) {
|
|
140634
|
+
if (ts.lastOrUndefined(stack) === 15 /* TemplateHead */) {
|
|
140635
|
+
if (ts.scanner.reScanTemplateToken(/* isTaggedTemplate */ false) === 17 /* TemplateTail */) {
|
|
140636
|
+
stack.pop();
|
|
140637
|
+
}
|
|
140638
|
+
}
|
|
140639
|
+
else {
|
|
140640
|
+
stack.pop();
|
|
140641
|
+
}
|
|
140642
|
+
}
|
|
140643
|
+
break;
|
|
140644
|
+
}
|
|
140645
|
+
token = ts.scanner.scan();
|
|
140646
|
+
}
|
|
140647
|
+
nextToken();
|
|
140648
|
+
}
|
|
140628
140649
|
// check if at least one of alternative have moved scanner forward
|
|
140629
140650
|
if (tryConsumeDeclare() ||
|
|
140630
140651
|
tryConsumeImport() ||
|
|
@@ -144647,6 +144668,7 @@ var ts;
|
|
|
144647
144668
|
return formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end, function (scanner) { return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options), getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile), scanner, formatContext, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile); });
|
|
144648
144669
|
}
|
|
144649
144670
|
function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, _a, requestKind, rangeContainsError, sourceFile) {
|
|
144671
|
+
var _b;
|
|
144650
144672
|
var options = _a.options, getRules = _a.getRules, host = _a.host;
|
|
144651
144673
|
// formatting context is used by rules provider
|
|
144652
144674
|
var formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
|
|
@@ -144678,11 +144700,12 @@ var ts;
|
|
|
144678
144700
|
}
|
|
144679
144701
|
}
|
|
144680
144702
|
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
144681
|
-
var
|
|
144703
|
+
var tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
144682
144704
|
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
144683
144705
|
undefined;
|
|
144684
|
-
if (
|
|
144685
|
-
|
|
144706
|
+
if (tokenInfo) {
|
|
144707
|
+
var parent = ((_b = ts.findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) === null || _b === void 0 ? void 0 : _b.parent) || previousParent;
|
|
144708
|
+
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
144686
144709
|
/*dynamicIndentation*/ undefined);
|
|
144687
144710
|
}
|
|
144688
144711
|
}
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = "
|
|
297
|
+
ts.version = "4.6.4";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -31548,18 +31548,8 @@ var ts;
|
|
|
31548
31548
|
if (tryParseSemicolon()) {
|
|
31549
31549
|
return;
|
|
31550
31550
|
}
|
|
31551
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31552
|
-
// we generally know there was an error already reported in the initializer...
|
|
31553
|
-
// class Example { a = new Map([), ) }
|
|
31554
|
-
// ~
|
|
31555
31551
|
if (initializer) {
|
|
31556
|
-
|
|
31557
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31558
|
-
// class Example { a = 0 {} }
|
|
31559
|
-
// ~
|
|
31560
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31561
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31562
|
-
}
|
|
31552
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31563
31553
|
return;
|
|
31564
31554
|
}
|
|
31565
31555
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -116767,7 +116757,7 @@ var ts;
|
|
|
116767
116757
|
return resolvedRef;
|
|
116768
116758
|
}
|
|
116769
116759
|
function verifyCompilerOptions() {
|
|
116770
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
116760
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
116771
116761
|
if (!isNightly) {
|
|
116772
116762
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
116773
116763
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
|
@@ -125585,12 +125575,8 @@ var ts;
|
|
|
125585
125575
|
}
|
|
125586
125576
|
}
|
|
125587
125577
|
ts.findNextToken = findNextToken;
|
|
125588
|
-
/**
|
|
125589
|
-
* Finds the rightmost token satisfying `token.end <= position`,
|
|
125590
|
-
* excluding `JsxText` tokens containing only whitespace.
|
|
125591
|
-
*/
|
|
125592
125578
|
function findPrecedingToken(position, sourceFile, startNode, excludeJsdoc) {
|
|
125593
|
-
var result = find(startNode || sourceFile);
|
|
125579
|
+
var result = find((startNode || sourceFile));
|
|
125594
125580
|
ts.Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result)));
|
|
125595
125581
|
return result;
|
|
125596
125582
|
function find(n) {
|
|
@@ -140625,6 +140611,41 @@ var ts;
|
|
|
140625
140611
|
if (ts.scanner.getToken() === 1 /* EndOfFileToken */) {
|
|
140626
140612
|
break;
|
|
140627
140613
|
}
|
|
140614
|
+
if (ts.scanner.getToken() === 15 /* TemplateHead */) {
|
|
140615
|
+
var stack = [ts.scanner.getToken()];
|
|
140616
|
+
var token = ts.scanner.scan();
|
|
140617
|
+
loop: while (ts.length(stack)) {
|
|
140618
|
+
switch (token) {
|
|
140619
|
+
case 1 /* EndOfFileToken */:
|
|
140620
|
+
break loop;
|
|
140621
|
+
case 100 /* ImportKeyword */:
|
|
140622
|
+
tryConsumeImport();
|
|
140623
|
+
break;
|
|
140624
|
+
case 15 /* TemplateHead */:
|
|
140625
|
+
stack.push(token);
|
|
140626
|
+
break;
|
|
140627
|
+
case 18 /* OpenBraceToken */:
|
|
140628
|
+
if (ts.length(stack)) {
|
|
140629
|
+
stack.push(token);
|
|
140630
|
+
}
|
|
140631
|
+
break;
|
|
140632
|
+
case 19 /* CloseBraceToken */:
|
|
140633
|
+
if (ts.length(stack)) {
|
|
140634
|
+
if (ts.lastOrUndefined(stack) === 15 /* TemplateHead */) {
|
|
140635
|
+
if (ts.scanner.reScanTemplateToken(/* isTaggedTemplate */ false) === 17 /* TemplateTail */) {
|
|
140636
|
+
stack.pop();
|
|
140637
|
+
}
|
|
140638
|
+
}
|
|
140639
|
+
else {
|
|
140640
|
+
stack.pop();
|
|
140641
|
+
}
|
|
140642
|
+
}
|
|
140643
|
+
break;
|
|
140644
|
+
}
|
|
140645
|
+
token = ts.scanner.scan();
|
|
140646
|
+
}
|
|
140647
|
+
nextToken();
|
|
140648
|
+
}
|
|
140628
140649
|
// check if at least one of alternative have moved scanner forward
|
|
140629
140650
|
if (tryConsumeDeclare() ||
|
|
140630
140651
|
tryConsumeImport() ||
|
|
@@ -144647,6 +144668,7 @@ var ts;
|
|
|
144647
144668
|
return formatting.getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end, function (scanner) { return formatSpanWorker(originalRange, enclosingNode, formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options), getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile), scanner, formatContext, requestKind, prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), sourceFile); });
|
|
144648
144669
|
}
|
|
144649
144670
|
function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, _a, requestKind, rangeContainsError, sourceFile) {
|
|
144671
|
+
var _b;
|
|
144650
144672
|
var options = _a.options, getRules = _a.getRules, host = _a.host;
|
|
144651
144673
|
// formatting context is used by rules provider
|
|
144652
144674
|
var formattingContext = new formatting.FormattingContext(sourceFile, requestKind, options);
|
|
@@ -144678,11 +144700,12 @@ var ts;
|
|
|
144678
144700
|
}
|
|
144679
144701
|
}
|
|
144680
144702
|
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
144681
|
-
var
|
|
144703
|
+
var tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
144682
144704
|
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
144683
144705
|
undefined;
|
|
144684
|
-
if (
|
|
144685
|
-
|
|
144706
|
+
if (tokenInfo) {
|
|
144707
|
+
var parent = ((_b = ts.findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) === null || _b === void 0 ? void 0 : _b.parent) || previousParent;
|
|
144708
|
+
processPair(tokenInfo, sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, parent, previousRange, previousRangeStartLine, previousParent, parent,
|
|
144686
144709
|
/*dynamicIndentation*/ undefined);
|
|
144687
144710
|
}
|
|
144688
144711
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "
|
|
92
|
+
ts.version = "4.6.4";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -31343,18 +31343,8 @@ var ts;
|
|
|
31343
31343
|
if (tryParseSemicolon()) {
|
|
31344
31344
|
return;
|
|
31345
31345
|
}
|
|
31346
|
-
// If an initializer was parsed but there is still an error in finding the next semicolon,
|
|
31347
|
-
// we generally know there was an error already reported in the initializer...
|
|
31348
|
-
// class Example { a = new Map([), ) }
|
|
31349
|
-
// ~
|
|
31350
31346
|
if (initializer) {
|
|
31351
|
-
|
|
31352
|
-
// case we can know that regardless of the initializer we should complain on the block.
|
|
31353
|
-
// class Example { a = 0 {} }
|
|
31354
|
-
// ~
|
|
31355
|
-
if (token() === 18 /* OpenBraceToken */) {
|
|
31356
|
-
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31357
|
-
}
|
|
31347
|
+
parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26 /* SemicolonToken */));
|
|
31358
31348
|
return;
|
|
31359
31349
|
}
|
|
31360
31350
|
parseErrorForMissingSemicolonAfter(name);
|
|
@@ -116562,7 +116552,7 @@ var ts;
|
|
|
116562
116552
|
return resolvedRef;
|
|
116563
116553
|
}
|
|
116564
116554
|
function verifyCompilerOptions() {
|
|
116565
|
-
var isNightly = ts.stringContains(ts.version, "-dev");
|
|
116555
|
+
var isNightly = ts.stringContains(ts.version, "-dev") || ts.stringContains(ts.version, "-insiders");
|
|
116566
116556
|
if (!isNightly) {
|
|
116567
116557
|
if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
|
|
116568
116558
|
createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
|
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": "4.6.
|
|
5
|
+
"version": "4.6.4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -129,4 +129,4 @@
|
|
|
129
129
|
"volta": {
|
|
130
130
|
"node": "14.15.5"
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|