typescript 4.9.0-dev.20221026 → 4.9.0-dev.20221028
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 +3 -2
- package/lib/tsserver.js +26 -5
- package/lib/tsserverlibrary.js +26 -5
- package/lib/typescript.js +26 -5
- package/lib/typescriptServices.js +26 -5
- package/lib/typingsInstaller.js +3 -2
- package/package.json +1 -1
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.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -59898,6 +59898,7 @@ var ts;
|
|
|
59898
59898
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
59899
59899
|
}
|
|
59900
59900
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
59901
|
+
symbol = resolveSymbol(symbol);
|
|
59901
59902
|
if (symbol.flags & (16 | 8192 | 32 | 512)) {
|
|
59902
59903
|
return getTypeOfSymbol(symbol);
|
|
59903
59904
|
}
|
|
@@ -59932,7 +59933,7 @@ var ts;
|
|
|
59932
59933
|
switch (node.kind) {
|
|
59933
59934
|
case 79:
|
|
59934
59935
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
59935
|
-
return getExplicitTypeOfSymbol(symbol
|
|
59936
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
59936
59937
|
case 108:
|
|
59937
59938
|
return getExplicitThisType(node);
|
|
59938
59939
|
case 106:
|
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -71611,6 +71611,7 @@ var ts;
|
|
|
71611
71611
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
71612
71612
|
}
|
|
71613
71613
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
71614
|
+
symbol = resolveSymbol(symbol);
|
|
71614
71615
|
if (symbol.flags & (16 /* SymbolFlags.Function */ | 8192 /* SymbolFlags.Method */ | 32 /* SymbolFlags.Class */ | 512 /* SymbolFlags.ValueModule */)) {
|
|
71615
71616
|
return getTypeOfSymbol(symbol);
|
|
71616
71617
|
}
|
|
@@ -71649,7 +71650,7 @@ var ts;
|
|
|
71649
71650
|
switch (node.kind) {
|
|
71650
71651
|
case 79 /* SyntaxKind.Identifier */:
|
|
71651
71652
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
71652
|
-
return getExplicitTypeOfSymbol(symbol
|
|
71653
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
71653
71654
|
case 108 /* SyntaxKind.ThisKeyword */:
|
|
71654
71655
|
return getExplicitThisType(node);
|
|
71655
71656
|
case 106 /* SyntaxKind.SuperKeyword */:
|
|
@@ -149951,10 +149952,10 @@ var ts;
|
|
|
149951
149952
|
!nodeIsInDecoratorContext(context.nextTokenParent);
|
|
149952
149953
|
}
|
|
149953
149954
|
function nodeIsInDecoratorContext(node) {
|
|
149954
|
-
while (ts.
|
|
149955
|
+
while (node && ts.isExpression(node)) {
|
|
149955
149956
|
node = node.parent;
|
|
149956
149957
|
}
|
|
149957
|
-
return node.kind === 167 /* SyntaxKind.Decorator */;
|
|
149958
|
+
return node && node.kind === 167 /* SyntaxKind.Decorator */;
|
|
149958
149959
|
}
|
|
149959
149960
|
function isStartOfVariableDeclarationList(context) {
|
|
149960
149961
|
return context.currentTokenParent.kind === 258 /* SyntaxKind.VariableDeclarationList */ &&
|
|
@@ -152872,6 +152873,26 @@ var ts;
|
|
|
152872
152873
|
function startPositionToDeleteNodeInList(sourceFile, node) {
|
|
152873
152874
|
return ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: LeadingTriviaOption.IncludeAll }), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
|
|
152874
152875
|
}
|
|
152876
|
+
function endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) {
|
|
152877
|
+
var end = startPositionToDeleteNodeInList(sourceFile, nextNode);
|
|
152878
|
+
if (prevNode === undefined || ts.positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) {
|
|
152879
|
+
return end;
|
|
152880
|
+
}
|
|
152881
|
+
var token = ts.findPrecedingToken(nextNode.getStart(sourceFile), sourceFile);
|
|
152882
|
+
if (isSeparator(node, token)) {
|
|
152883
|
+
var prevToken = ts.findPrecedingToken(node.getStart(sourceFile), sourceFile);
|
|
152884
|
+
if (isSeparator(prevNode, prevToken)) {
|
|
152885
|
+
var pos = ts.skipTrivia(sourceFile.text, token.getEnd(), /*stopAfterLineBreak*/ true, /*stopAtComments*/ true);
|
|
152886
|
+
if (ts.positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) {
|
|
152887
|
+
return ts.isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos;
|
|
152888
|
+
}
|
|
152889
|
+
if (ts.isLineBreak(sourceFile.text.charCodeAt(pos))) {
|
|
152890
|
+
return pos;
|
|
152891
|
+
}
|
|
152892
|
+
}
|
|
152893
|
+
}
|
|
152894
|
+
return end;
|
|
152895
|
+
}
|
|
152875
152896
|
function getClassOrObjectBraceEnds(cls, sourceFile) {
|
|
152876
152897
|
var open = ts.findChildOfKind(cls, 18 /* SyntaxKind.OpenBraceToken */, sourceFile);
|
|
152877
152898
|
var close = ts.findChildOfKind(cls, 19 /* SyntaxKind.CloseBraceToken */, sourceFile);
|
|
@@ -153429,7 +153450,7 @@ var ts;
|
|
|
153429
153450
|
deletedNodesInLists.add(node);
|
|
153430
153451
|
changes.deleteRange(sourceFile, {
|
|
153431
153452
|
pos: startPositionToDeleteNodeInList(sourceFile, node),
|
|
153432
|
-
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) :
|
|
153453
|
+
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1]),
|
|
153433
153454
|
});
|
|
153434
153455
|
}
|
|
153435
153456
|
})(textChanges = ts.textChanges || (ts.textChanges = {}));
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -108,7 +108,7 @@ var ts;
|
|
|
108
108
|
// The following is baselined as a literal template type without intervention
|
|
109
109
|
/** The version of the TypeScript compiler release */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
111
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
111
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
112
112
|
/* @internal */
|
|
113
113
|
var Comparison;
|
|
114
114
|
(function (Comparison) {
|
|
@@ -71610,6 +71610,7 @@ var ts;
|
|
|
71610
71610
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
71611
71611
|
}
|
|
71612
71612
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
71613
|
+
symbol = resolveSymbol(symbol);
|
|
71613
71614
|
if (symbol.flags & (16 /* SymbolFlags.Function */ | 8192 /* SymbolFlags.Method */ | 32 /* SymbolFlags.Class */ | 512 /* SymbolFlags.ValueModule */)) {
|
|
71614
71615
|
return getTypeOfSymbol(symbol);
|
|
71615
71616
|
}
|
|
@@ -71648,7 +71649,7 @@ var ts;
|
|
|
71648
71649
|
switch (node.kind) {
|
|
71649
71650
|
case 79 /* SyntaxKind.Identifier */:
|
|
71650
71651
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
71651
|
-
return getExplicitTypeOfSymbol(symbol
|
|
71652
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
71652
71653
|
case 108 /* SyntaxKind.ThisKeyword */:
|
|
71653
71654
|
return getExplicitThisType(node);
|
|
71654
71655
|
case 106 /* SyntaxKind.SuperKeyword */:
|
|
@@ -150369,10 +150370,10 @@ var ts;
|
|
|
150369
150370
|
!nodeIsInDecoratorContext(context.nextTokenParent);
|
|
150370
150371
|
}
|
|
150371
150372
|
function nodeIsInDecoratorContext(node) {
|
|
150372
|
-
while (ts.
|
|
150373
|
+
while (node && ts.isExpression(node)) {
|
|
150373
150374
|
node = node.parent;
|
|
150374
150375
|
}
|
|
150375
|
-
return node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150376
|
+
return node && node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150376
150377
|
}
|
|
150377
150378
|
function isStartOfVariableDeclarationList(context) {
|
|
150378
150379
|
return context.currentTokenParent.kind === 258 /* SyntaxKind.VariableDeclarationList */ &&
|
|
@@ -153290,6 +153291,26 @@ var ts;
|
|
|
153290
153291
|
function startPositionToDeleteNodeInList(sourceFile, node) {
|
|
153291
153292
|
return ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: LeadingTriviaOption.IncludeAll }), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
|
|
153292
153293
|
}
|
|
153294
|
+
function endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) {
|
|
153295
|
+
var end = startPositionToDeleteNodeInList(sourceFile, nextNode);
|
|
153296
|
+
if (prevNode === undefined || ts.positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) {
|
|
153297
|
+
return end;
|
|
153298
|
+
}
|
|
153299
|
+
var token = ts.findPrecedingToken(nextNode.getStart(sourceFile), sourceFile);
|
|
153300
|
+
if (isSeparator(node, token)) {
|
|
153301
|
+
var prevToken = ts.findPrecedingToken(node.getStart(sourceFile), sourceFile);
|
|
153302
|
+
if (isSeparator(prevNode, prevToken)) {
|
|
153303
|
+
var pos = ts.skipTrivia(sourceFile.text, token.getEnd(), /*stopAfterLineBreak*/ true, /*stopAtComments*/ true);
|
|
153304
|
+
if (ts.positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) {
|
|
153305
|
+
return ts.isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos;
|
|
153306
|
+
}
|
|
153307
|
+
if (ts.isLineBreak(sourceFile.text.charCodeAt(pos))) {
|
|
153308
|
+
return pos;
|
|
153309
|
+
}
|
|
153310
|
+
}
|
|
153311
|
+
}
|
|
153312
|
+
return end;
|
|
153313
|
+
}
|
|
153293
153314
|
function getClassOrObjectBraceEnds(cls, sourceFile) {
|
|
153294
153315
|
var open = ts.findChildOfKind(cls, 18 /* SyntaxKind.OpenBraceToken */, sourceFile);
|
|
153295
153316
|
var close = ts.findChildOfKind(cls, 19 /* SyntaxKind.CloseBraceToken */, sourceFile);
|
|
@@ -153847,7 +153868,7 @@ var ts;
|
|
|
153847
153868
|
deletedNodesInLists.add(node);
|
|
153848
153869
|
changes.deleteRange(sourceFile, {
|
|
153849
153870
|
pos: startPositionToDeleteNodeInList(sourceFile, node),
|
|
153850
|
-
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) :
|
|
153871
|
+
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1]),
|
|
153851
153872
|
});
|
|
153852
153873
|
}
|
|
153853
153874
|
})(textChanges = ts.textChanges || (ts.textChanges = {}));
|
package/lib/typescript.js
CHANGED
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -71601,6 +71601,7 @@ var ts;
|
|
|
71601
71601
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
71602
71602
|
}
|
|
71603
71603
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
71604
|
+
symbol = resolveSymbol(symbol);
|
|
71604
71605
|
if (symbol.flags & (16 /* SymbolFlags.Function */ | 8192 /* SymbolFlags.Method */ | 32 /* SymbolFlags.Class */ | 512 /* SymbolFlags.ValueModule */)) {
|
|
71605
71606
|
return getTypeOfSymbol(symbol);
|
|
71606
71607
|
}
|
|
@@ -71639,7 +71640,7 @@ var ts;
|
|
|
71639
71640
|
switch (node.kind) {
|
|
71640
71641
|
case 79 /* SyntaxKind.Identifier */:
|
|
71641
71642
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
71642
|
-
return getExplicitTypeOfSymbol(symbol
|
|
71643
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
71643
71644
|
case 108 /* SyntaxKind.ThisKeyword */:
|
|
71644
71645
|
return getExplicitThisType(node);
|
|
71645
71646
|
case 106 /* SyntaxKind.SuperKeyword */:
|
|
@@ -150360,10 +150361,10 @@ var ts;
|
|
|
150360
150361
|
!nodeIsInDecoratorContext(context.nextTokenParent);
|
|
150361
150362
|
}
|
|
150362
150363
|
function nodeIsInDecoratorContext(node) {
|
|
150363
|
-
while (ts.
|
|
150364
|
+
while (node && ts.isExpression(node)) {
|
|
150364
150365
|
node = node.parent;
|
|
150365
150366
|
}
|
|
150366
|
-
return node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150367
|
+
return node && node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150367
150368
|
}
|
|
150368
150369
|
function isStartOfVariableDeclarationList(context) {
|
|
150369
150370
|
return context.currentTokenParent.kind === 258 /* SyntaxKind.VariableDeclarationList */ &&
|
|
@@ -153281,6 +153282,26 @@ var ts;
|
|
|
153281
153282
|
function startPositionToDeleteNodeInList(sourceFile, node) {
|
|
153282
153283
|
return ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: LeadingTriviaOption.IncludeAll }), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
|
|
153283
153284
|
}
|
|
153285
|
+
function endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) {
|
|
153286
|
+
var end = startPositionToDeleteNodeInList(sourceFile, nextNode);
|
|
153287
|
+
if (prevNode === undefined || ts.positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) {
|
|
153288
|
+
return end;
|
|
153289
|
+
}
|
|
153290
|
+
var token = ts.findPrecedingToken(nextNode.getStart(sourceFile), sourceFile);
|
|
153291
|
+
if (isSeparator(node, token)) {
|
|
153292
|
+
var prevToken = ts.findPrecedingToken(node.getStart(sourceFile), sourceFile);
|
|
153293
|
+
if (isSeparator(prevNode, prevToken)) {
|
|
153294
|
+
var pos = ts.skipTrivia(sourceFile.text, token.getEnd(), /*stopAfterLineBreak*/ true, /*stopAtComments*/ true);
|
|
153295
|
+
if (ts.positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) {
|
|
153296
|
+
return ts.isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos;
|
|
153297
|
+
}
|
|
153298
|
+
if (ts.isLineBreak(sourceFile.text.charCodeAt(pos))) {
|
|
153299
|
+
return pos;
|
|
153300
|
+
}
|
|
153301
|
+
}
|
|
153302
|
+
}
|
|
153303
|
+
return end;
|
|
153304
|
+
}
|
|
153284
153305
|
function getClassOrObjectBraceEnds(cls, sourceFile) {
|
|
153285
153306
|
var open = ts.findChildOfKind(cls, 18 /* SyntaxKind.OpenBraceToken */, sourceFile);
|
|
153286
153307
|
var close = ts.findChildOfKind(cls, 19 /* SyntaxKind.CloseBraceToken */, sourceFile);
|
|
@@ -153838,7 +153859,7 @@ var ts;
|
|
|
153838
153859
|
deletedNodesInLists.add(node);
|
|
153839
153860
|
changes.deleteRange(sourceFile, {
|
|
153840
153861
|
pos: startPositionToDeleteNodeInList(sourceFile, node),
|
|
153841
|
-
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) :
|
|
153862
|
+
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1]),
|
|
153842
153863
|
});
|
|
153843
153864
|
}
|
|
153844
153865
|
})(textChanges = ts.textChanges || (ts.textChanges = {}));
|
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -71601,6 +71601,7 @@ var ts;
|
|
|
71601
71601
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
71602
71602
|
}
|
|
71603
71603
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
71604
|
+
symbol = resolveSymbol(symbol);
|
|
71604
71605
|
if (symbol.flags & (16 /* SymbolFlags.Function */ | 8192 /* SymbolFlags.Method */ | 32 /* SymbolFlags.Class */ | 512 /* SymbolFlags.ValueModule */)) {
|
|
71605
71606
|
return getTypeOfSymbol(symbol);
|
|
71606
71607
|
}
|
|
@@ -71639,7 +71640,7 @@ var ts;
|
|
|
71639
71640
|
switch (node.kind) {
|
|
71640
71641
|
case 79 /* SyntaxKind.Identifier */:
|
|
71641
71642
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
71642
|
-
return getExplicitTypeOfSymbol(symbol
|
|
71643
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
71643
71644
|
case 108 /* SyntaxKind.ThisKeyword */:
|
|
71644
71645
|
return getExplicitThisType(node);
|
|
71645
71646
|
case 106 /* SyntaxKind.SuperKeyword */:
|
|
@@ -150360,10 +150361,10 @@ var ts;
|
|
|
150360
150361
|
!nodeIsInDecoratorContext(context.nextTokenParent);
|
|
150361
150362
|
}
|
|
150362
150363
|
function nodeIsInDecoratorContext(node) {
|
|
150363
|
-
while (ts.
|
|
150364
|
+
while (node && ts.isExpression(node)) {
|
|
150364
150365
|
node = node.parent;
|
|
150365
150366
|
}
|
|
150366
|
-
return node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150367
|
+
return node && node.kind === 167 /* SyntaxKind.Decorator */;
|
|
150367
150368
|
}
|
|
150368
150369
|
function isStartOfVariableDeclarationList(context) {
|
|
150369
150370
|
return context.currentTokenParent.kind === 258 /* SyntaxKind.VariableDeclarationList */ &&
|
|
@@ -153281,6 +153282,26 @@ var ts;
|
|
|
153281
153282
|
function startPositionToDeleteNodeInList(sourceFile, node) {
|
|
153282
153283
|
return ts.skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: LeadingTriviaOption.IncludeAll }), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true);
|
|
153283
153284
|
}
|
|
153285
|
+
function endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) {
|
|
153286
|
+
var end = startPositionToDeleteNodeInList(sourceFile, nextNode);
|
|
153287
|
+
if (prevNode === undefined || ts.positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) {
|
|
153288
|
+
return end;
|
|
153289
|
+
}
|
|
153290
|
+
var token = ts.findPrecedingToken(nextNode.getStart(sourceFile), sourceFile);
|
|
153291
|
+
if (isSeparator(node, token)) {
|
|
153292
|
+
var prevToken = ts.findPrecedingToken(node.getStart(sourceFile), sourceFile);
|
|
153293
|
+
if (isSeparator(prevNode, prevToken)) {
|
|
153294
|
+
var pos = ts.skipTrivia(sourceFile.text, token.getEnd(), /*stopAfterLineBreak*/ true, /*stopAtComments*/ true);
|
|
153295
|
+
if (ts.positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) {
|
|
153296
|
+
return ts.isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos;
|
|
153297
|
+
}
|
|
153298
|
+
if (ts.isLineBreak(sourceFile.text.charCodeAt(pos))) {
|
|
153299
|
+
return pos;
|
|
153300
|
+
}
|
|
153301
|
+
}
|
|
153302
|
+
}
|
|
153303
|
+
return end;
|
|
153304
|
+
}
|
|
153284
153305
|
function getClassOrObjectBraceEnds(cls, sourceFile) {
|
|
153285
153306
|
var open = ts.findChildOfKind(cls, 18 /* SyntaxKind.OpenBraceToken */, sourceFile);
|
|
153286
153307
|
var close = ts.findChildOfKind(cls, 19 /* SyntaxKind.CloseBraceToken */, sourceFile);
|
|
@@ -153838,7 +153859,7 @@ var ts;
|
|
|
153838
153859
|
deletedNodesInLists.add(node);
|
|
153839
153860
|
changes.deleteRange(sourceFile, {
|
|
153840
153861
|
pos: startPositionToDeleteNodeInList(sourceFile, node),
|
|
153841
|
-
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) :
|
|
153862
|
+
end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1]),
|
|
153842
153863
|
});
|
|
153843
153864
|
}
|
|
153844
153865
|
})(textChanges = ts.textChanges || (ts.textChanges = {}));
|
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 = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221028");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -71591,6 +71591,7 @@ var ts;
|
|
|
71591
71591
|
ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
|
|
71592
71592
|
}
|
|
71593
71593
|
function getExplicitTypeOfSymbol(symbol, diagnostic) {
|
|
71594
|
+
symbol = resolveSymbol(symbol);
|
|
71594
71595
|
if (symbol.flags & (16 /* SymbolFlags.Function */ | 8192 /* SymbolFlags.Method */ | 32 /* SymbolFlags.Class */ | 512 /* SymbolFlags.ValueModule */)) {
|
|
71595
71596
|
return getTypeOfSymbol(symbol);
|
|
71596
71597
|
}
|
|
@@ -71629,7 +71630,7 @@ var ts;
|
|
|
71629
71630
|
switch (node.kind) {
|
|
71630
71631
|
case 79 /* SyntaxKind.Identifier */:
|
|
71631
71632
|
var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
|
|
71632
|
-
return getExplicitTypeOfSymbol(symbol
|
|
71633
|
+
return getExplicitTypeOfSymbol(symbol, diagnostic);
|
|
71633
71634
|
case 108 /* SyntaxKind.ThisKeyword */:
|
|
71634
71635
|
return getExplicitThisType(node);
|
|
71635
71636
|
case 106 /* SyntaxKind.SuperKeyword */:
|
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.9.0-dev.
|
|
5
|
+
"version": "4.9.0-dev.20221028",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|