typescript 4.9.0-dev.20220822 → 4.9.0-dev.20220825
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/.gitattributes +1 -0
- package/lib/tsc.js +68 -46
- package/lib/tsserver.js +98 -74
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +98 -74
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +95 -71
- package/lib/typescriptServices.d.ts +2 -0
- package/lib/typescriptServices.js +95 -71
- package/lib/typingsInstaller.js +80 -55
- package/package.json +13 -2
- package/.eslintcache +0 -1
- package/CODE_OF_CONDUCT.md +0 -1
- package/CopyrightNotice.txt +0 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text eol=lf
|
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 = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220825";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -24563,17 +24563,6 @@ var ts;
|
|
|
24563
24563
|
|| kind === 173;
|
|
24564
24564
|
}
|
|
24565
24565
|
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
24566
|
-
function canHaveDecorators(node) {
|
|
24567
|
-
var kind = node.kind;
|
|
24568
|
-
return kind === 164
|
|
24569
|
-
|| kind === 167
|
|
24570
|
-
|| kind === 169
|
|
24571
|
-
|| kind === 172
|
|
24572
|
-
|| kind === 173
|
|
24573
|
-
|| kind === 226
|
|
24574
|
-
|| kind === 257;
|
|
24575
|
-
}
|
|
24576
|
-
ts.canHaveDecorators = canHaveDecorators;
|
|
24577
24566
|
function canHaveIllegalDecorators(node) {
|
|
24578
24567
|
var kind = node.kind;
|
|
24579
24568
|
return kind === 296
|
|
@@ -24595,35 +24584,6 @@ var ts;
|
|
|
24595
24584
|
|| kind === 271;
|
|
24596
24585
|
}
|
|
24597
24586
|
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
24598
|
-
function canHaveModifiers(node) {
|
|
24599
|
-
var kind = node.kind;
|
|
24600
|
-
return kind === 163
|
|
24601
|
-
|| kind === 164
|
|
24602
|
-
|| kind === 166
|
|
24603
|
-
|| kind === 167
|
|
24604
|
-
|| kind === 168
|
|
24605
|
-
|| kind === 169
|
|
24606
|
-
|| kind === 171
|
|
24607
|
-
|| kind === 172
|
|
24608
|
-
|| kind === 173
|
|
24609
|
-
|| kind === 176
|
|
24610
|
-
|| kind === 180
|
|
24611
|
-
|| kind === 213
|
|
24612
|
-
|| kind === 214
|
|
24613
|
-
|| kind === 226
|
|
24614
|
-
|| kind === 237
|
|
24615
|
-
|| kind === 256
|
|
24616
|
-
|| kind === 257
|
|
24617
|
-
|| kind === 258
|
|
24618
|
-
|| kind === 259
|
|
24619
|
-
|| kind === 260
|
|
24620
|
-
|| kind === 261
|
|
24621
|
-
|| kind === 265
|
|
24622
|
-
|| kind === 266
|
|
24623
|
-
|| kind === 271
|
|
24624
|
-
|| kind === 272;
|
|
24625
|
-
}
|
|
24626
|
-
ts.canHaveModifiers = canHaveModifiers;
|
|
24627
24587
|
function canHaveIllegalModifiers(node) {
|
|
24628
24588
|
var kind = node.kind;
|
|
24629
24589
|
return kind === 170
|
|
@@ -24871,6 +24831,46 @@ var ts;
|
|
|
24871
24831
|
return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
|
|
24872
24832
|
}
|
|
24873
24833
|
ts.setTextRange = setTextRange;
|
|
24834
|
+
function canHaveModifiers(node) {
|
|
24835
|
+
var kind = node.kind;
|
|
24836
|
+
return kind === 163
|
|
24837
|
+
|| kind === 164
|
|
24838
|
+
|| kind === 166
|
|
24839
|
+
|| kind === 167
|
|
24840
|
+
|| kind === 168
|
|
24841
|
+
|| kind === 169
|
|
24842
|
+
|| kind === 171
|
|
24843
|
+
|| kind === 172
|
|
24844
|
+
|| kind === 173
|
|
24845
|
+
|| kind === 176
|
|
24846
|
+
|| kind === 180
|
|
24847
|
+
|| kind === 213
|
|
24848
|
+
|| kind === 214
|
|
24849
|
+
|| kind === 226
|
|
24850
|
+
|| kind === 237
|
|
24851
|
+
|| kind === 256
|
|
24852
|
+
|| kind === 257
|
|
24853
|
+
|| kind === 258
|
|
24854
|
+
|| kind === 259
|
|
24855
|
+
|| kind === 260
|
|
24856
|
+
|| kind === 261
|
|
24857
|
+
|| kind === 265
|
|
24858
|
+
|| kind === 266
|
|
24859
|
+
|| kind === 271
|
|
24860
|
+
|| kind === 272;
|
|
24861
|
+
}
|
|
24862
|
+
ts.canHaveModifiers = canHaveModifiers;
|
|
24863
|
+
function canHaveDecorators(node) {
|
|
24864
|
+
var kind = node.kind;
|
|
24865
|
+
return kind === 164
|
|
24866
|
+
|| kind === 167
|
|
24867
|
+
|| kind === 169
|
|
24868
|
+
|| kind === 172
|
|
24869
|
+
|| kind === 173
|
|
24870
|
+
|| kind === 226
|
|
24871
|
+
|| kind === 257;
|
|
24872
|
+
}
|
|
24873
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
24874
24874
|
})(ts || (ts = {}));
|
|
24875
24875
|
var ts;
|
|
24876
24876
|
(function (ts) {
|
|
@@ -40197,6 +40197,7 @@ var ts;
|
|
|
40197
40197
|
signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
|
|
40198
40198
|
symbolToEntityName: nodeBuilder.symbolToEntityName,
|
|
40199
40199
|
symbolToExpression: nodeBuilder.symbolToExpression,
|
|
40200
|
+
symbolToNode: nodeBuilder.symbolToNode,
|
|
40200
40201
|
symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations,
|
|
40201
40202
|
symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration,
|
|
40202
40203
|
typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration,
|
|
@@ -42525,7 +42526,7 @@ var ts;
|
|
|
42525
42526
|
}
|
|
42526
42527
|
}
|
|
42527
42528
|
function getFullyQualifiedName(symbol, containingLocation) {
|
|
42528
|
-
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, undefined,
|
|
42529
|
+
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, undefined, 32 | 4);
|
|
42529
42530
|
}
|
|
42530
42531
|
function getContainingQualifiedNameNode(node) {
|
|
42531
42532
|
while (ts.isQualifiedName(node.parent)) {
|
|
@@ -43676,10 +43677,13 @@ var ts;
|
|
|
43676
43677
|
if (flags & 8) {
|
|
43677
43678
|
nodeFlags |= 16384;
|
|
43678
43679
|
}
|
|
43679
|
-
if (flags &
|
|
43680
|
+
if (flags & 32) {
|
|
43680
43681
|
nodeFlags |= 134217728;
|
|
43681
43682
|
}
|
|
43682
|
-
|
|
43683
|
+
if (flags & 16) {
|
|
43684
|
+
nodeFlags |= 1073741824;
|
|
43685
|
+
}
|
|
43686
|
+
var builder = flags & 4 ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName;
|
|
43683
43687
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
43684
43688
|
function symbolToStringWorker(writer) {
|
|
43685
43689
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
@@ -43776,7 +43780,25 @@ var ts;
|
|
|
43776
43780
|
symbolTableToDeclarationStatements: function (symbolTable, enclosingDeclaration, flags, tracker, bundled) {
|
|
43777
43781
|
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolTableToDeclarationStatements(symbolTable, context, bundled); });
|
|
43778
43782
|
},
|
|
43783
|
+
symbolToNode: function (symbol, meaning, enclosingDeclaration, flags, tracker) {
|
|
43784
|
+
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolToNode(symbol, context, meaning); });
|
|
43785
|
+
},
|
|
43779
43786
|
};
|
|
43787
|
+
function symbolToNode(symbol, context, meaning) {
|
|
43788
|
+
if (context.flags & 1073741824) {
|
|
43789
|
+
if (symbol.valueDeclaration) {
|
|
43790
|
+
var name = ts.getNameOfDeclaration(symbol.valueDeclaration);
|
|
43791
|
+
if (name && ts.isComputedPropertyName(name))
|
|
43792
|
+
return name;
|
|
43793
|
+
}
|
|
43794
|
+
var nameType = getSymbolLinks(symbol).nameType;
|
|
43795
|
+
if (nameType && nameType.flags & (1024 | 8192)) {
|
|
43796
|
+
context.enclosingDeclaration = nameType.symbol.valueDeclaration;
|
|
43797
|
+
return ts.factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning));
|
|
43798
|
+
}
|
|
43799
|
+
}
|
|
43800
|
+
return symbolToExpression(symbol, context, meaning);
|
|
43801
|
+
}
|
|
43780
43802
|
function withContext(enclosingDeclaration, flags, tracker, cb) {
|
|
43781
43803
|
var _a, _b;
|
|
43782
43804
|
ts.Debug.assert(enclosingDeclaration === undefined || (enclosingDeclaration.flags & 8) === 0);
|
|
@@ -55031,7 +55053,7 @@ var ts;
|
|
|
55031
55053
|
return 0;
|
|
55032
55054
|
}
|
|
55033
55055
|
}
|
|
55034
|
-
var isPerformingCommonPropertyChecks = (relation !== comparableRelation ||
|
|
55056
|
+
var isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & 1048576) && isLiteralType(source)) &&
|
|
55035
55057
|
!(intersectionState & 2) &&
|
|
55036
55058
|
source.flags & (131068 | 524288 | 2097152) && source !== globalObjectType &&
|
|
55037
55059
|
target.flags & (524288 | 2097152) && isWeakType(target) &&
|
|
@@ -56144,7 +56166,7 @@ var ts;
|
|
|
56144
56166
|
shouldSkipElaboration = true;
|
|
56145
56167
|
}
|
|
56146
56168
|
if (props.length === 1) {
|
|
56147
|
-
var propName = symbolToString(unmatchedProperty);
|
|
56169
|
+
var propName = symbolToString(unmatchedProperty, undefined, 0, 4 | 16);
|
|
56148
56170
|
reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
|
|
56149
56171
|
if (ts.length(unmatchedProperty.declarations)) {
|
|
56150
56172
|
associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
|
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 = ts.versionMajorMinor + ".0-dev.
|
|
112
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220825";
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -130,7 +130,7 @@ var ts;
|
|
|
130
130
|
function tryGetNativeMap() {
|
|
131
131
|
// Internet Explorer's Map doesn't support iteration, so don't use it.
|
|
132
132
|
var gMap = globals === null || globals === void 0 ? void 0 : globals.Map;
|
|
133
|
-
// eslint-disable-next-line no-in-operator
|
|
133
|
+
// eslint-disable-next-line local/no-in-operator
|
|
134
134
|
var constructor = typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
|
|
135
135
|
if (!constructor) {
|
|
136
136
|
throw new Error("No compatible Map implementation found.");
|
|
@@ -144,7 +144,7 @@ var ts;
|
|
|
144
144
|
function tryGetNativeSet() {
|
|
145
145
|
// Internet Explorer's Set doesn't support iteration, so don't use it.
|
|
146
146
|
var gSet = globals === null || globals === void 0 ? void 0 : globals.Set;
|
|
147
|
-
// eslint-disable-next-line no-in-operator
|
|
147
|
+
// eslint-disable-next-line local/no-in-operator
|
|
148
148
|
var constructor = typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
|
|
149
149
|
if (!constructor) {
|
|
150
150
|
throw new Error("No compatible Set implementation found.");
|
|
@@ -2843,7 +2843,7 @@ var ts;
|
|
|
2843
2843
|
Debug.formatControlFlowGraph = formatControlFlowGraph;
|
|
2844
2844
|
var flowNodeProto;
|
|
2845
2845
|
function attachFlowNodeDebugInfoWorker(flowNode) {
|
|
2846
|
-
if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator
|
|
2846
|
+
if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line local/no-in-operator
|
|
2847
2847
|
Object.defineProperties(flowNode, {
|
|
2848
2848
|
// for use with vscode-js-debug's new customDescriptionGenerator in launch.json
|
|
2849
2849
|
__tsDebuggerDisplay: {
|
|
@@ -2889,7 +2889,7 @@ var ts;
|
|
|
2889
2889
|
Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo;
|
|
2890
2890
|
var nodeArrayProto;
|
|
2891
2891
|
function attachNodeArrayDebugInfoWorker(array) {
|
|
2892
|
-
if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line no-in-operator
|
|
2892
|
+
if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line local/no-in-operator
|
|
2893
2893
|
Object.defineProperties(array, {
|
|
2894
2894
|
__tsDebuggerDisplay: {
|
|
2895
2895
|
value: function (defaultValue) {
|
|
@@ -4841,6 +4841,7 @@ var ts;
|
|
|
4841
4841
|
NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple";
|
|
4842
4842
|
NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType";
|
|
4843
4843
|
NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType";
|
|
4844
|
+
/* @internal */ NodeBuilderFlags[NodeBuilderFlags["WriteComputedProps"] = 1073741824] = "WriteComputedProps";
|
|
4844
4845
|
// Errors (cont.)
|
|
4845
4846
|
NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths";
|
|
4846
4847
|
/* @internal */ NodeBuilderFlags[NodeBuilderFlags["DoNotIncludeSymbolChain"] = 134217728] = "DoNotIncludeSymbolChain";
|
|
@@ -4901,8 +4902,10 @@ var ts;
|
|
|
4901
4902
|
SymbolFormatFlags[SymbolFormatFlags["AllowAnyNodeKind"] = 4] = "AllowAnyNodeKind";
|
|
4902
4903
|
// Prefer aliases which are not directly visible
|
|
4903
4904
|
SymbolFormatFlags[SymbolFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 8] = "UseAliasDefinedOutsideCurrentScope";
|
|
4905
|
+
// { [E.A]: 1 }
|
|
4906
|
+
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["WriteComputedProps"] = 16] = "WriteComputedProps";
|
|
4904
4907
|
// Skip building an accessible symbol chain
|
|
4905
|
-
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] =
|
|
4908
|
+
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] = 32] = "DoNotIncludeSymbolChain";
|
|
4906
4909
|
})(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
|
|
4907
4910
|
/* @internal */
|
|
4908
4911
|
var SymbolAccessibility;
|
|
@@ -30544,17 +30547,6 @@ var ts;
|
|
|
30544
30547
|
|| kind === 173 /* SetAccessor */;
|
|
30545
30548
|
}
|
|
30546
30549
|
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
30547
|
-
function canHaveDecorators(node) {
|
|
30548
|
-
var kind = node.kind;
|
|
30549
|
-
return kind === 164 /* Parameter */
|
|
30550
|
-
|| kind === 167 /* PropertyDeclaration */
|
|
30551
|
-
|| kind === 169 /* MethodDeclaration */
|
|
30552
|
-
|| kind === 172 /* GetAccessor */
|
|
30553
|
-
|| kind === 173 /* SetAccessor */
|
|
30554
|
-
|| kind === 226 /* ClassExpression */
|
|
30555
|
-
|| kind === 257 /* ClassDeclaration */;
|
|
30556
|
-
}
|
|
30557
|
-
ts.canHaveDecorators = canHaveDecorators;
|
|
30558
30550
|
function canHaveIllegalDecorators(node) {
|
|
30559
30551
|
var kind = node.kind;
|
|
30560
30552
|
return kind === 296 /* PropertyAssignment */
|
|
@@ -30576,35 +30568,6 @@ var ts;
|
|
|
30576
30568
|
|| kind === 271 /* ExportAssignment */;
|
|
30577
30569
|
}
|
|
30578
30570
|
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
30579
|
-
function canHaveModifiers(node) {
|
|
30580
|
-
var kind = node.kind;
|
|
30581
|
-
return kind === 163 /* TypeParameter */
|
|
30582
|
-
|| kind === 164 /* Parameter */
|
|
30583
|
-
|| kind === 166 /* PropertySignature */
|
|
30584
|
-
|| kind === 167 /* PropertyDeclaration */
|
|
30585
|
-
|| kind === 168 /* MethodSignature */
|
|
30586
|
-
|| kind === 169 /* MethodDeclaration */
|
|
30587
|
-
|| kind === 171 /* Constructor */
|
|
30588
|
-
|| kind === 172 /* GetAccessor */
|
|
30589
|
-
|| kind === 173 /* SetAccessor */
|
|
30590
|
-
|| kind === 176 /* IndexSignature */
|
|
30591
|
-
|| kind === 180 /* ConstructorType */
|
|
30592
|
-
|| kind === 213 /* FunctionExpression */
|
|
30593
|
-
|| kind === 214 /* ArrowFunction */
|
|
30594
|
-
|| kind === 226 /* ClassExpression */
|
|
30595
|
-
|| kind === 237 /* VariableStatement */
|
|
30596
|
-
|| kind === 256 /* FunctionDeclaration */
|
|
30597
|
-
|| kind === 257 /* ClassDeclaration */
|
|
30598
|
-
|| kind === 258 /* InterfaceDeclaration */
|
|
30599
|
-
|| kind === 259 /* TypeAliasDeclaration */
|
|
30600
|
-
|| kind === 260 /* EnumDeclaration */
|
|
30601
|
-
|| kind === 261 /* ModuleDeclaration */
|
|
30602
|
-
|| kind === 265 /* ImportEqualsDeclaration */
|
|
30603
|
-
|| kind === 266 /* ImportDeclaration */
|
|
30604
|
-
|| kind === 271 /* ExportAssignment */
|
|
30605
|
-
|| kind === 272 /* ExportDeclaration */;
|
|
30606
|
-
}
|
|
30607
|
-
ts.canHaveModifiers = canHaveModifiers;
|
|
30608
30571
|
function canHaveIllegalModifiers(node) {
|
|
30609
30572
|
var kind = node.kind;
|
|
30610
30573
|
return kind === 170 /* ClassStaticBlockDeclaration */
|
|
@@ -30893,6 +30856,46 @@ var ts;
|
|
|
30893
30856
|
return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
|
|
30894
30857
|
}
|
|
30895
30858
|
ts.setTextRange = setTextRange;
|
|
30859
|
+
function canHaveModifiers(node) {
|
|
30860
|
+
var kind = node.kind;
|
|
30861
|
+
return kind === 163 /* TypeParameter */
|
|
30862
|
+
|| kind === 164 /* Parameter */
|
|
30863
|
+
|| kind === 166 /* PropertySignature */
|
|
30864
|
+
|| kind === 167 /* PropertyDeclaration */
|
|
30865
|
+
|| kind === 168 /* MethodSignature */
|
|
30866
|
+
|| kind === 169 /* MethodDeclaration */
|
|
30867
|
+
|| kind === 171 /* Constructor */
|
|
30868
|
+
|| kind === 172 /* GetAccessor */
|
|
30869
|
+
|| kind === 173 /* SetAccessor */
|
|
30870
|
+
|| kind === 176 /* IndexSignature */
|
|
30871
|
+
|| kind === 180 /* ConstructorType */
|
|
30872
|
+
|| kind === 213 /* FunctionExpression */
|
|
30873
|
+
|| kind === 214 /* ArrowFunction */
|
|
30874
|
+
|| kind === 226 /* ClassExpression */
|
|
30875
|
+
|| kind === 237 /* VariableStatement */
|
|
30876
|
+
|| kind === 256 /* FunctionDeclaration */
|
|
30877
|
+
|| kind === 257 /* ClassDeclaration */
|
|
30878
|
+
|| kind === 258 /* InterfaceDeclaration */
|
|
30879
|
+
|| kind === 259 /* TypeAliasDeclaration */
|
|
30880
|
+
|| kind === 260 /* EnumDeclaration */
|
|
30881
|
+
|| kind === 261 /* ModuleDeclaration */
|
|
30882
|
+
|| kind === 265 /* ImportEqualsDeclaration */
|
|
30883
|
+
|| kind === 266 /* ImportDeclaration */
|
|
30884
|
+
|| kind === 271 /* ExportAssignment */
|
|
30885
|
+
|| kind === 272 /* ExportDeclaration */;
|
|
30886
|
+
}
|
|
30887
|
+
ts.canHaveModifiers = canHaveModifiers;
|
|
30888
|
+
function canHaveDecorators(node) {
|
|
30889
|
+
var kind = node.kind;
|
|
30890
|
+
return kind === 164 /* Parameter */
|
|
30891
|
+
|| kind === 167 /* PropertyDeclaration */
|
|
30892
|
+
|| kind === 169 /* MethodDeclaration */
|
|
30893
|
+
|| kind === 172 /* GetAccessor */
|
|
30894
|
+
|| kind === 173 /* SetAccessor */
|
|
30895
|
+
|| kind === 226 /* ClassExpression */
|
|
30896
|
+
|| kind === 257 /* ClassDeclaration */;
|
|
30897
|
+
}
|
|
30898
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
30896
30899
|
})(ts || (ts = {}));
|
|
30897
30900
|
var ts;
|
|
30898
30901
|
(function (ts) {
|
|
@@ -49060,6 +49063,7 @@ var ts;
|
|
|
49060
49063
|
signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
|
|
49061
49064
|
symbolToEntityName: nodeBuilder.symbolToEntityName,
|
|
49062
49065
|
symbolToExpression: nodeBuilder.symbolToExpression,
|
|
49066
|
+
symbolToNode: nodeBuilder.symbolToNode,
|
|
49063
49067
|
symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations,
|
|
49064
49068
|
symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration,
|
|
49065
49069
|
typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration,
|
|
@@ -49729,10 +49733,10 @@ var ts;
|
|
|
49729
49733
|
}
|
|
49730
49734
|
// Issue errors globally
|
|
49731
49735
|
var file = ts.getSourceFileOfNode(location);
|
|
49732
|
-
addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line no-in-operator
|
|
49736
|
+
addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line local/no-in-operator
|
|
49733
49737
|
return;
|
|
49734
49738
|
}
|
|
49735
|
-
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line no-in-operator
|
|
49739
|
+
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line local/no-in-operator
|
|
49736
49740
|
}
|
|
49737
49741
|
function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
|
|
49738
49742
|
var diagnostic = error(location, message, arg0, arg1, arg2, arg3);
|
|
@@ -51715,7 +51719,7 @@ var ts;
|
|
|
51715
51719
|
}
|
|
51716
51720
|
}
|
|
51717
51721
|
function getFullyQualifiedName(symbol, containingLocation) {
|
|
51718
|
-
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined,
|
|
51722
|
+
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined, 32 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */);
|
|
51719
51723
|
}
|
|
51720
51724
|
function getContainingQualifiedNameNode(node) {
|
|
51721
51725
|
while (ts.isQualifiedName(node.parent)) {
|
|
@@ -53030,10 +53034,13 @@ var ts;
|
|
|
53030
53034
|
if (flags & 8 /* UseAliasDefinedOutsideCurrentScope */) {
|
|
53031
53035
|
nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */;
|
|
53032
53036
|
}
|
|
53033
|
-
if (flags &
|
|
53037
|
+
if (flags & 32 /* DoNotIncludeSymbolChain */) {
|
|
53034
53038
|
nodeFlags |= 134217728 /* DoNotIncludeSymbolChain */;
|
|
53035
53039
|
}
|
|
53036
|
-
|
|
53040
|
+
if (flags & 16 /* WriteComputedProps */) {
|
|
53041
|
+
nodeFlags |= 1073741824 /* WriteComputedProps */;
|
|
53042
|
+
}
|
|
53043
|
+
var builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName;
|
|
53037
53044
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
53038
53045
|
function symbolToStringWorker(writer) {
|
|
53039
53046
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); // TODO: GH#18217
|
|
@@ -53133,7 +53140,25 @@ var ts;
|
|
|
53133
53140
|
symbolTableToDeclarationStatements: function (symbolTable, enclosingDeclaration, flags, tracker, bundled) {
|
|
53134
53141
|
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolTableToDeclarationStatements(symbolTable, context, bundled); });
|
|
53135
53142
|
},
|
|
53143
|
+
symbolToNode: function (symbol, meaning, enclosingDeclaration, flags, tracker) {
|
|
53144
|
+
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolToNode(symbol, context, meaning); });
|
|
53145
|
+
},
|
|
53136
53146
|
};
|
|
53147
|
+
function symbolToNode(symbol, context, meaning) {
|
|
53148
|
+
if (context.flags & 1073741824 /* WriteComputedProps */) {
|
|
53149
|
+
if (symbol.valueDeclaration) {
|
|
53150
|
+
var name = ts.getNameOfDeclaration(symbol.valueDeclaration);
|
|
53151
|
+
if (name && ts.isComputedPropertyName(name))
|
|
53152
|
+
return name;
|
|
53153
|
+
}
|
|
53154
|
+
var nameType = getSymbolLinks(symbol).nameType;
|
|
53155
|
+
if (nameType && nameType.flags & (1024 /* EnumLiteral */ | 8192 /* UniqueESSymbol */)) {
|
|
53156
|
+
context.enclosingDeclaration = nameType.symbol.valueDeclaration;
|
|
53157
|
+
return ts.factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning));
|
|
53158
|
+
}
|
|
53159
|
+
}
|
|
53160
|
+
return symbolToExpression(symbol, context, meaning);
|
|
53161
|
+
}
|
|
53137
53162
|
function withContext(enclosingDeclaration, flags, tracker, cb) {
|
|
53138
53163
|
var _a, _b;
|
|
53139
53164
|
ts.Debug.assert(enclosingDeclaration === undefined || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0);
|
|
@@ -65937,7 +65962,7 @@ var ts;
|
|
|
65937
65962
|
return 0 /* False */;
|
|
65938
65963
|
}
|
|
65939
65964
|
}
|
|
65940
|
-
var isPerformingCommonPropertyChecks = (relation !== comparableRelation ||
|
|
65965
|
+
var isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & 1048576 /* Union */) && isLiteralType(source)) &&
|
|
65941
65966
|
!(intersectionState & 2 /* Target */) &&
|
|
65942
65967
|
source.flags & (131068 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source !== globalObjectType &&
|
|
65943
65968
|
target.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target) &&
|
|
@@ -67316,7 +67341,7 @@ var ts;
|
|
|
67316
67341
|
shouldSkipElaboration = true; // Retain top-level error for interface implementing issues, otherwise omit it
|
|
67317
67342
|
}
|
|
67318
67343
|
if (props.length === 1) {
|
|
67319
|
-
var propName = symbolToString(unmatchedProperty);
|
|
67344
|
+
var propName = symbolToString(unmatchedProperty, /*enclosingDeclaration*/ undefined, 0 /* None */, 4 /* AllowAnyNodeKind */ | 16 /* WriteComputedProps */);
|
|
67320
67345
|
reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
|
|
67321
67346
|
if (ts.length(unmatchedProperty.declarations)) {
|
|
67322
67347
|
associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
|
|
@@ -91359,7 +91384,7 @@ var ts;
|
|
|
91359
91384
|
exit();
|
|
91360
91385
|
return sourceIndex;
|
|
91361
91386
|
}
|
|
91362
|
-
/* eslint-disable boolean-trivia, no-null/no-null */
|
|
91387
|
+
/* eslint-disable local/boolean-trivia, no-null/no-null */
|
|
91363
91388
|
function setSourceContent(sourceIndex, content) {
|
|
91364
91389
|
enter();
|
|
91365
91390
|
if (content !== null) {
|
|
@@ -91372,7 +91397,7 @@ var ts;
|
|
|
91372
91397
|
}
|
|
91373
91398
|
exit();
|
|
91374
91399
|
}
|
|
91375
|
-
/* eslint-enable boolean-trivia, no-null/no-null */
|
|
91400
|
+
/* eslint-enable local/boolean-trivia, no-null/no-null */
|
|
91376
91401
|
function addName(name) {
|
|
91377
91402
|
enter();
|
|
91378
91403
|
if (!nameToNameIndexMap)
|
|
@@ -132628,7 +132653,7 @@ var ts;
|
|
|
132628
132653
|
// defined in `ts.commentPragmas` would be excessive, but we can avoid
|
|
132629
132654
|
// some obvious false positives (e.g. in XML-like doc comments) by
|
|
132630
132655
|
// checking the element name.
|
|
132631
|
-
// eslint-disable-next-line no-in-operator
|
|
132656
|
+
// eslint-disable-next-line local/no-in-operator
|
|
132632
132657
|
if (!match[3] || !(match[3] in ts.commentPragmas)) {
|
|
132633
132658
|
return false;
|
|
132634
132659
|
}
|
|
@@ -133330,7 +133355,7 @@ var ts;
|
|
|
133330
133355
|
// Get string literal completions from specialized signatures of the target
|
|
133331
133356
|
// i.e. declare function f(a: 'A');
|
|
133332
133357
|
// f("/*completion position*/")
|
|
133333
|
-
return argumentInfo
|
|
133358
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
|
|
133334
133359
|
}
|
|
133335
133360
|
// falls through (is `require("")` or `require(""` or `import("")`)
|
|
133336
133361
|
case 266 /* ImportDeclaration */:
|
|
@@ -133386,7 +133411,7 @@ var ts;
|
|
|
133386
133411
|
isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
|
|
133387
133412
|
return getStringLiteralTypes(type, uniques);
|
|
133388
133413
|
});
|
|
133389
|
-
return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier };
|
|
133414
|
+
return ts.length(types) ? { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier } : undefined;
|
|
133390
133415
|
}
|
|
133391
133416
|
function stringLiteralCompletionsFromProperties(type) {
|
|
133392
133417
|
return type && {
|
|
@@ -140325,7 +140350,7 @@ var ts;
|
|
|
140325
140350
|
}
|
|
140326
140351
|
}
|
|
140327
140352
|
function addReference(referenceLocation, relatedSymbol, state) {
|
|
140328
|
-
var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line no-in-operator
|
|
140353
|
+
var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line local/no-in-operator
|
|
140329
140354
|
// if rename symbol from default export anonymous function, for example `export default function() {}`, we do not need to add reference
|
|
140330
140355
|
if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) {
|
|
140331
140356
|
return;
|
|
@@ -146111,11 +146136,11 @@ var ts;
|
|
|
146111
146136
|
// not enough to put us in the substitution expression; we should consider ourselves part of
|
|
146112
146137
|
// the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1).
|
|
146113
146138
|
//
|
|
146114
|
-
/* eslint-disable no-double-space */
|
|
146139
|
+
/* eslint-disable local/no-double-space */
|
|
146115
146140
|
// Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # `
|
|
146116
146141
|
// ^ ^ ^ ^ ^ ^ ^ ^ ^
|
|
146117
146142
|
// Case: 1 1 3 2 1 3 2 2 1
|
|
146118
|
-
/* eslint-enable no-double-space */
|
|
146143
|
+
/* eslint-enable local/no-double-space */
|
|
146119
146144
|
ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node.");
|
|
146120
146145
|
if (ts.isTemplateLiteralToken(node)) {
|
|
146121
146146
|
if (ts.isInsideTemplateLiteral(node, position, sourceFile)) {
|
|
@@ -154136,7 +154161,7 @@ var ts;
|
|
|
154136
154161
|
name = getMapEntryOrDefault(funcNode.name);
|
|
154137
154162
|
}
|
|
154138
154163
|
// return undefined argName when arg is null or undefined
|
|
154139
|
-
// eslint-disable-next-line no-in-operator
|
|
154164
|
+
// eslint-disable-next-line local/no-in-operator
|
|
154140
154165
|
if (!name || "identifier" in name && name.identifier.text === "undefined") {
|
|
154141
154166
|
return undefined;
|
|
154142
154167
|
}
|
|
@@ -157404,11 +157429,10 @@ var ts;
|
|
|
157404
157429
|
return declaration && declaration.parent === node ? declaration : undefined;
|
|
157405
157430
|
}
|
|
157406
157431
|
function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) {
|
|
157407
|
-
if (ts.isTransientSymbol(symbol)
|
|
157408
|
-
var
|
|
157409
|
-
if (
|
|
157410
|
-
return
|
|
157411
|
-
}
|
|
157432
|
+
if (ts.isTransientSymbol(symbol)) {
|
|
157433
|
+
var prop = checker.symbolToNode(symbol, 111551 /* Value */, /*enclosingDeclaration*/ undefined, 1073741824 /* WriteComputedProps */);
|
|
157434
|
+
if (prop && ts.isComputedPropertyName(prop))
|
|
157435
|
+
return prop;
|
|
157412
157436
|
}
|
|
157413
157437
|
return ts.createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */);
|
|
157414
157438
|
}
|
|
@@ -166322,7 +166346,7 @@ var ts;
|
|
|
166322
166346
|
this.kind = kind;
|
|
166323
166347
|
}
|
|
166324
166348
|
NodeObject.prototype.assertHasRealPosition = function (message) {
|
|
166325
|
-
// eslint-disable-next-line debug-assert
|
|
166349
|
+
// eslint-disable-next-line local/debug-assert
|
|
166326
166350
|
ts.Debug.assert(!ts.positionIsSynthesized(this.pos) && !ts.positionIsSynthesized(this.end), message || "Node must have a real position for this operation");
|
|
166327
166351
|
};
|
|
166328
166352
|
NodeObject.prototype.getSourceFile = function () {
|
|
@@ -169366,7 +169390,7 @@ var debugObjectHost = (function () {
|
|
|
169366
169390
|
return this;
|
|
169367
169391
|
})();
|
|
169368
169392
|
// We need to use 'null' to interface with the managed side.
|
|
169369
|
-
/* eslint-disable no-in-operator */
|
|
169393
|
+
/* eslint-disable local/no-in-operator */
|
|
169370
169394
|
/* @internal */
|
|
169371
169395
|
var ts;
|
|
169372
169396
|
(function (ts) {
|
|
@@ -170166,7 +170190,7 @@ var ts;
|
|
|
170166
170190
|
}());
|
|
170167
170191
|
ts.TypeScriptServicesFactory = TypeScriptServicesFactory;
|
|
170168
170192
|
})(ts || (ts = {}));
|
|
170169
|
-
/* eslint-enable no-in-operator */
|
|
170193
|
+
/* eslint-enable local/no-in-operator */
|
|
170170
170194
|
// We polyfill `globalThis` here so re can reliably patch the global scope
|
|
170171
170195
|
// in the contexts we want to in the same way across script and module formats
|
|
170172
170196
|
/* eslint-enable no-var */
|
|
@@ -173226,7 +173250,7 @@ var ts;
|
|
|
173226
173250
|
var newLS = pluginModule.create(info);
|
|
173227
173251
|
for (var _i = 0, _a = Object.keys(this.languageService); _i < _a.length; _i++) {
|
|
173228
173252
|
var k = _a[_i];
|
|
173229
|
-
// eslint-disable-next-line no-in-operator
|
|
173253
|
+
// eslint-disable-next-line local/no-in-operator
|
|
173230
173254
|
if (!(k in newLS)) {
|
|
173231
173255
|
this.projectService.logger.info("Plugin activation warning: Missing proxied method " + k + " in created LS. Patching.");
|
|
173232
173256
|
newLS[k] = this.languageService[k];
|
|
@@ -179630,9 +179654,9 @@ var ts;
|
|
|
179630
179654
|
};
|
|
179631
179655
|
Session.prototype.getFileAndLanguageServiceForSyntacticOperation = function (args) {
|
|
179632
179656
|
// Since this is syntactic operation, there should always be project for the file
|
|
179633
|
-
//
|
|
179657
|
+
// throw if we dont get project
|
|
179634
179658
|
var file = server.toNormalizedPath(args.file);
|
|
179635
|
-
var project = this.getProject(args.projectFileName) || this.projectService.
|
|
179659
|
+
var project = this.getProject(args.projectFileName) || this.projectService.ensureDefaultProjectForFile(file);
|
|
179636
179660
|
if (!project) {
|
|
179637
179661
|
return server.Errors.ThrowNoProject();
|
|
179638
179662
|
}
|
|
@@ -182425,7 +182449,7 @@ var ts;
|
|
|
182425
182449
|
if (typeof value === "number") {
|
|
182426
182450
|
return ts.factory.createNumericLiteral(value);
|
|
182427
182451
|
}
|
|
182428
|
-
// eslint-disable-next-line no-in-operator
|
|
182452
|
+
// eslint-disable-next-line local/no-in-operator
|
|
182429
182453
|
if (typeof value === "object" && "base10Value" in value) { // PseudoBigInt
|
|
182430
182454
|
return ts.factory.createBigIntLiteral(value);
|
|
182431
182455
|
}
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -4834,6 +4834,8 @@ declare namespace ts {
|
|
|
4834
4834
|
}
|
|
4835
4835
|
declare namespace ts {
|
|
4836
4836
|
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
|
|
4837
|
+
function canHaveModifiers(node: Node): node is HasModifiers;
|
|
4838
|
+
function canHaveDecorators(node: Node): node is HasDecorators;
|
|
4837
4839
|
}
|
|
4838
4840
|
declare namespace ts {
|
|
4839
4841
|
/**
|