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
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 = ts.versionMajorMinor + ".0-dev.
|
|
102
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220825";
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -120,7 +120,7 @@ var ts;
|
|
|
120
120
|
function tryGetNativeMap() {
|
|
121
121
|
// Internet Explorer's Map doesn't support iteration, so don't use it.
|
|
122
122
|
var gMap = globals === null || globals === void 0 ? void 0 : globals.Map;
|
|
123
|
-
// eslint-disable-next-line no-in-operator
|
|
123
|
+
// eslint-disable-next-line local/no-in-operator
|
|
124
124
|
var constructor = typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
|
|
125
125
|
if (!constructor) {
|
|
126
126
|
throw new Error("No compatible Map implementation found.");
|
|
@@ -134,7 +134,7 @@ var ts;
|
|
|
134
134
|
function tryGetNativeSet() {
|
|
135
135
|
// Internet Explorer's Set doesn't support iteration, so don't use it.
|
|
136
136
|
var gSet = globals === null || globals === void 0 ? void 0 : globals.Set;
|
|
137
|
-
// eslint-disable-next-line no-in-operator
|
|
137
|
+
// eslint-disable-next-line local/no-in-operator
|
|
138
138
|
var constructor = typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
|
|
139
139
|
if (!constructor) {
|
|
140
140
|
throw new Error("No compatible Set implementation found.");
|
|
@@ -2833,7 +2833,7 @@ var ts;
|
|
|
2833
2833
|
Debug.formatControlFlowGraph = formatControlFlowGraph;
|
|
2834
2834
|
var flowNodeProto;
|
|
2835
2835
|
function attachFlowNodeDebugInfoWorker(flowNode) {
|
|
2836
|
-
if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator
|
|
2836
|
+
if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line local/no-in-operator
|
|
2837
2837
|
Object.defineProperties(flowNode, {
|
|
2838
2838
|
// for use with vscode-js-debug's new customDescriptionGenerator in launch.json
|
|
2839
2839
|
__tsDebuggerDisplay: {
|
|
@@ -2879,7 +2879,7 @@ var ts;
|
|
|
2879
2879
|
Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo;
|
|
2880
2880
|
var nodeArrayProto;
|
|
2881
2881
|
function attachNodeArrayDebugInfoWorker(array) {
|
|
2882
|
-
if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line no-in-operator
|
|
2882
|
+
if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line local/no-in-operator
|
|
2883
2883
|
Object.defineProperties(array, {
|
|
2884
2884
|
__tsDebuggerDisplay: {
|
|
2885
2885
|
value: function (defaultValue) {
|
|
@@ -4831,6 +4831,7 @@ var ts;
|
|
|
4831
4831
|
NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple";
|
|
4832
4832
|
NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType";
|
|
4833
4833
|
NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType";
|
|
4834
|
+
/* @internal */ NodeBuilderFlags[NodeBuilderFlags["WriteComputedProps"] = 1073741824] = "WriteComputedProps";
|
|
4834
4835
|
// Errors (cont.)
|
|
4835
4836
|
NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths";
|
|
4836
4837
|
/* @internal */ NodeBuilderFlags[NodeBuilderFlags["DoNotIncludeSymbolChain"] = 134217728] = "DoNotIncludeSymbolChain";
|
|
@@ -4891,8 +4892,10 @@ var ts;
|
|
|
4891
4892
|
SymbolFormatFlags[SymbolFormatFlags["AllowAnyNodeKind"] = 4] = "AllowAnyNodeKind";
|
|
4892
4893
|
// Prefer aliases which are not directly visible
|
|
4893
4894
|
SymbolFormatFlags[SymbolFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 8] = "UseAliasDefinedOutsideCurrentScope";
|
|
4895
|
+
// { [E.A]: 1 }
|
|
4896
|
+
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["WriteComputedProps"] = 16] = "WriteComputedProps";
|
|
4894
4897
|
// Skip building an accessible symbol chain
|
|
4895
|
-
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] =
|
|
4898
|
+
/* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] = 32] = "DoNotIncludeSymbolChain";
|
|
4896
4899
|
})(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
|
|
4897
4900
|
/* @internal */
|
|
4898
4901
|
var SymbolAccessibility;
|
|
@@ -30534,17 +30537,6 @@ var ts;
|
|
|
30534
30537
|
|| kind === 173 /* SetAccessor */;
|
|
30535
30538
|
}
|
|
30536
30539
|
ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
|
|
30537
|
-
function canHaveDecorators(node) {
|
|
30538
|
-
var kind = node.kind;
|
|
30539
|
-
return kind === 164 /* Parameter */
|
|
30540
|
-
|| kind === 167 /* PropertyDeclaration */
|
|
30541
|
-
|| kind === 169 /* MethodDeclaration */
|
|
30542
|
-
|| kind === 172 /* GetAccessor */
|
|
30543
|
-
|| kind === 173 /* SetAccessor */
|
|
30544
|
-
|| kind === 226 /* ClassExpression */
|
|
30545
|
-
|| kind === 257 /* ClassDeclaration */;
|
|
30546
|
-
}
|
|
30547
|
-
ts.canHaveDecorators = canHaveDecorators;
|
|
30548
30540
|
function canHaveIllegalDecorators(node) {
|
|
30549
30541
|
var kind = node.kind;
|
|
30550
30542
|
return kind === 296 /* PropertyAssignment */
|
|
@@ -30566,35 +30558,6 @@ var ts;
|
|
|
30566
30558
|
|| kind === 271 /* ExportAssignment */;
|
|
30567
30559
|
}
|
|
30568
30560
|
ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
|
|
30569
|
-
function canHaveModifiers(node) {
|
|
30570
|
-
var kind = node.kind;
|
|
30571
|
-
return kind === 163 /* TypeParameter */
|
|
30572
|
-
|| kind === 164 /* Parameter */
|
|
30573
|
-
|| kind === 166 /* PropertySignature */
|
|
30574
|
-
|| kind === 167 /* PropertyDeclaration */
|
|
30575
|
-
|| kind === 168 /* MethodSignature */
|
|
30576
|
-
|| kind === 169 /* MethodDeclaration */
|
|
30577
|
-
|| kind === 171 /* Constructor */
|
|
30578
|
-
|| kind === 172 /* GetAccessor */
|
|
30579
|
-
|| kind === 173 /* SetAccessor */
|
|
30580
|
-
|| kind === 176 /* IndexSignature */
|
|
30581
|
-
|| kind === 180 /* ConstructorType */
|
|
30582
|
-
|| kind === 213 /* FunctionExpression */
|
|
30583
|
-
|| kind === 214 /* ArrowFunction */
|
|
30584
|
-
|| kind === 226 /* ClassExpression */
|
|
30585
|
-
|| kind === 237 /* VariableStatement */
|
|
30586
|
-
|| kind === 256 /* FunctionDeclaration */
|
|
30587
|
-
|| kind === 257 /* ClassDeclaration */
|
|
30588
|
-
|| kind === 258 /* InterfaceDeclaration */
|
|
30589
|
-
|| kind === 259 /* TypeAliasDeclaration */
|
|
30590
|
-
|| kind === 260 /* EnumDeclaration */
|
|
30591
|
-
|| kind === 261 /* ModuleDeclaration */
|
|
30592
|
-
|| kind === 265 /* ImportEqualsDeclaration */
|
|
30593
|
-
|| kind === 266 /* ImportDeclaration */
|
|
30594
|
-
|| kind === 271 /* ExportAssignment */
|
|
30595
|
-
|| kind === 272 /* ExportDeclaration */;
|
|
30596
|
-
}
|
|
30597
|
-
ts.canHaveModifiers = canHaveModifiers;
|
|
30598
30561
|
function canHaveIllegalModifiers(node) {
|
|
30599
30562
|
var kind = node.kind;
|
|
30600
30563
|
return kind === 170 /* ClassStaticBlockDeclaration */
|
|
@@ -30883,6 +30846,46 @@ var ts;
|
|
|
30883
30846
|
return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
|
|
30884
30847
|
}
|
|
30885
30848
|
ts.setTextRange = setTextRange;
|
|
30849
|
+
function canHaveModifiers(node) {
|
|
30850
|
+
var kind = node.kind;
|
|
30851
|
+
return kind === 163 /* TypeParameter */
|
|
30852
|
+
|| kind === 164 /* Parameter */
|
|
30853
|
+
|| kind === 166 /* PropertySignature */
|
|
30854
|
+
|| kind === 167 /* PropertyDeclaration */
|
|
30855
|
+
|| kind === 168 /* MethodSignature */
|
|
30856
|
+
|| kind === 169 /* MethodDeclaration */
|
|
30857
|
+
|| kind === 171 /* Constructor */
|
|
30858
|
+
|| kind === 172 /* GetAccessor */
|
|
30859
|
+
|| kind === 173 /* SetAccessor */
|
|
30860
|
+
|| kind === 176 /* IndexSignature */
|
|
30861
|
+
|| kind === 180 /* ConstructorType */
|
|
30862
|
+
|| kind === 213 /* FunctionExpression */
|
|
30863
|
+
|| kind === 214 /* ArrowFunction */
|
|
30864
|
+
|| kind === 226 /* ClassExpression */
|
|
30865
|
+
|| kind === 237 /* VariableStatement */
|
|
30866
|
+
|| kind === 256 /* FunctionDeclaration */
|
|
30867
|
+
|| kind === 257 /* ClassDeclaration */
|
|
30868
|
+
|| kind === 258 /* InterfaceDeclaration */
|
|
30869
|
+
|| kind === 259 /* TypeAliasDeclaration */
|
|
30870
|
+
|| kind === 260 /* EnumDeclaration */
|
|
30871
|
+
|| kind === 261 /* ModuleDeclaration */
|
|
30872
|
+
|| kind === 265 /* ImportEqualsDeclaration */
|
|
30873
|
+
|| kind === 266 /* ImportDeclaration */
|
|
30874
|
+
|| kind === 271 /* ExportAssignment */
|
|
30875
|
+
|| kind === 272 /* ExportDeclaration */;
|
|
30876
|
+
}
|
|
30877
|
+
ts.canHaveModifiers = canHaveModifiers;
|
|
30878
|
+
function canHaveDecorators(node) {
|
|
30879
|
+
var kind = node.kind;
|
|
30880
|
+
return kind === 164 /* Parameter */
|
|
30881
|
+
|| kind === 167 /* PropertyDeclaration */
|
|
30882
|
+
|| kind === 169 /* MethodDeclaration */
|
|
30883
|
+
|| kind === 172 /* GetAccessor */
|
|
30884
|
+
|| kind === 173 /* SetAccessor */
|
|
30885
|
+
|| kind === 226 /* ClassExpression */
|
|
30886
|
+
|| kind === 257 /* ClassDeclaration */;
|
|
30887
|
+
}
|
|
30888
|
+
ts.canHaveDecorators = canHaveDecorators;
|
|
30886
30889
|
})(ts || (ts = {}));
|
|
30887
30890
|
var ts;
|
|
30888
30891
|
(function (ts) {
|
|
@@ -49050,6 +49053,7 @@ var ts;
|
|
|
49050
49053
|
signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
|
|
49051
49054
|
symbolToEntityName: nodeBuilder.symbolToEntityName,
|
|
49052
49055
|
symbolToExpression: nodeBuilder.symbolToExpression,
|
|
49056
|
+
symbolToNode: nodeBuilder.symbolToNode,
|
|
49053
49057
|
symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations,
|
|
49054
49058
|
symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration,
|
|
49055
49059
|
typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration,
|
|
@@ -49719,10 +49723,10 @@ var ts;
|
|
|
49719
49723
|
}
|
|
49720
49724
|
// Issue errors globally
|
|
49721
49725
|
var file = ts.getSourceFileOfNode(location);
|
|
49722
|
-
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
|
|
49726
|
+
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
|
|
49723
49727
|
return;
|
|
49724
49728
|
}
|
|
49725
|
-
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line no-in-operator
|
|
49729
|
+
addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line local/no-in-operator
|
|
49726
49730
|
}
|
|
49727
49731
|
function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
|
|
49728
49732
|
var diagnostic = error(location, message, arg0, arg1, arg2, arg3);
|
|
@@ -51705,7 +51709,7 @@ var ts;
|
|
|
51705
51709
|
}
|
|
51706
51710
|
}
|
|
51707
51711
|
function getFullyQualifiedName(symbol, containingLocation) {
|
|
51708
|
-
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined,
|
|
51712
|
+
return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined, 32 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */);
|
|
51709
51713
|
}
|
|
51710
51714
|
function getContainingQualifiedNameNode(node) {
|
|
51711
51715
|
while (ts.isQualifiedName(node.parent)) {
|
|
@@ -53020,10 +53024,13 @@ var ts;
|
|
|
53020
53024
|
if (flags & 8 /* UseAliasDefinedOutsideCurrentScope */) {
|
|
53021
53025
|
nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */;
|
|
53022
53026
|
}
|
|
53023
|
-
if (flags &
|
|
53027
|
+
if (flags & 32 /* DoNotIncludeSymbolChain */) {
|
|
53024
53028
|
nodeFlags |= 134217728 /* DoNotIncludeSymbolChain */;
|
|
53025
53029
|
}
|
|
53026
|
-
|
|
53030
|
+
if (flags & 16 /* WriteComputedProps */) {
|
|
53031
|
+
nodeFlags |= 1073741824 /* WriteComputedProps */;
|
|
53032
|
+
}
|
|
53033
|
+
var builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName;
|
|
53027
53034
|
return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
|
|
53028
53035
|
function symbolToStringWorker(writer) {
|
|
53029
53036
|
var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); // TODO: GH#18217
|
|
@@ -53123,7 +53130,25 @@ var ts;
|
|
|
53123
53130
|
symbolTableToDeclarationStatements: function (symbolTable, enclosingDeclaration, flags, tracker, bundled) {
|
|
53124
53131
|
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolTableToDeclarationStatements(symbolTable, context, bundled); });
|
|
53125
53132
|
},
|
|
53133
|
+
symbolToNode: function (symbol, meaning, enclosingDeclaration, flags, tracker) {
|
|
53134
|
+
return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolToNode(symbol, context, meaning); });
|
|
53135
|
+
},
|
|
53126
53136
|
};
|
|
53137
|
+
function symbolToNode(symbol, context, meaning) {
|
|
53138
|
+
if (context.flags & 1073741824 /* WriteComputedProps */) {
|
|
53139
|
+
if (symbol.valueDeclaration) {
|
|
53140
|
+
var name = ts.getNameOfDeclaration(symbol.valueDeclaration);
|
|
53141
|
+
if (name && ts.isComputedPropertyName(name))
|
|
53142
|
+
return name;
|
|
53143
|
+
}
|
|
53144
|
+
var nameType = getSymbolLinks(symbol).nameType;
|
|
53145
|
+
if (nameType && nameType.flags & (1024 /* EnumLiteral */ | 8192 /* UniqueESSymbol */)) {
|
|
53146
|
+
context.enclosingDeclaration = nameType.symbol.valueDeclaration;
|
|
53147
|
+
return ts.factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning));
|
|
53148
|
+
}
|
|
53149
|
+
}
|
|
53150
|
+
return symbolToExpression(symbol, context, meaning);
|
|
53151
|
+
}
|
|
53127
53152
|
function withContext(enclosingDeclaration, flags, tracker, cb) {
|
|
53128
53153
|
var _a, _b;
|
|
53129
53154
|
ts.Debug.assert(enclosingDeclaration === undefined || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0);
|
|
@@ -65927,7 +65952,7 @@ var ts;
|
|
|
65927
65952
|
return 0 /* False */;
|
|
65928
65953
|
}
|
|
65929
65954
|
}
|
|
65930
|
-
var isPerformingCommonPropertyChecks = (relation !== comparableRelation ||
|
|
65955
|
+
var isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & 1048576 /* Union */) && isLiteralType(source)) &&
|
|
65931
65956
|
!(intersectionState & 2 /* Target */) &&
|
|
65932
65957
|
source.flags & (131068 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source !== globalObjectType &&
|
|
65933
65958
|
target.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target) &&
|
|
@@ -67306,7 +67331,7 @@ var ts;
|
|
|
67306
67331
|
shouldSkipElaboration = true; // Retain top-level error for interface implementing issues, otherwise omit it
|
|
67307
67332
|
}
|
|
67308
67333
|
if (props.length === 1) {
|
|
67309
|
-
var propName = symbolToString(unmatchedProperty);
|
|
67334
|
+
var propName = symbolToString(unmatchedProperty, /*enclosingDeclaration*/ undefined, 0 /* None */, 4 /* AllowAnyNodeKind */ | 16 /* WriteComputedProps */);
|
|
67310
67335
|
reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
|
|
67311
67336
|
if (ts.length(unmatchedProperty.declarations)) {
|
|
67312
67337
|
associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
|
|
@@ -91349,7 +91374,7 @@ var ts;
|
|
|
91349
91374
|
exit();
|
|
91350
91375
|
return sourceIndex;
|
|
91351
91376
|
}
|
|
91352
|
-
/* eslint-disable boolean-trivia, no-null/no-null */
|
|
91377
|
+
/* eslint-disable local/boolean-trivia, no-null/no-null */
|
|
91353
91378
|
function setSourceContent(sourceIndex, content) {
|
|
91354
91379
|
enter();
|
|
91355
91380
|
if (content !== null) {
|
|
@@ -91362,7 +91387,7 @@ var ts;
|
|
|
91362
91387
|
}
|
|
91363
91388
|
exit();
|
|
91364
91389
|
}
|
|
91365
|
-
/* eslint-enable boolean-trivia, no-null/no-null */
|
|
91390
|
+
/* eslint-enable local/boolean-trivia, no-null/no-null */
|
|
91366
91391
|
function addName(name) {
|
|
91367
91392
|
enter();
|
|
91368
91393
|
if (!nameToNameIndexMap)
|
|
@@ -133037,7 +133062,7 @@ var ts;
|
|
|
133037
133062
|
// defined in `ts.commentPragmas` would be excessive, but we can avoid
|
|
133038
133063
|
// some obvious false positives (e.g. in XML-like doc comments) by
|
|
133039
133064
|
// checking the element name.
|
|
133040
|
-
// eslint-disable-next-line no-in-operator
|
|
133065
|
+
// eslint-disable-next-line local/no-in-operator
|
|
133041
133066
|
if (!match[3] || !(match[3] in ts.commentPragmas)) {
|
|
133042
133067
|
return false;
|
|
133043
133068
|
}
|
|
@@ -133739,7 +133764,7 @@ var ts;
|
|
|
133739
133764
|
// Get string literal completions from specialized signatures of the target
|
|
133740
133765
|
// i.e. declare function f(a: 'A');
|
|
133741
133766
|
// f("/*completion position*/")
|
|
133742
|
-
return argumentInfo
|
|
133767
|
+
return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
|
|
133743
133768
|
}
|
|
133744
133769
|
// falls through (is `require("")` or `require(""` or `import("")`)
|
|
133745
133770
|
case 266 /* ImportDeclaration */:
|
|
@@ -133795,7 +133820,7 @@ var ts;
|
|
|
133795
133820
|
isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
|
|
133796
133821
|
return getStringLiteralTypes(type, uniques);
|
|
133797
133822
|
});
|
|
133798
|
-
return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier };
|
|
133823
|
+
return ts.length(types) ? { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier } : undefined;
|
|
133799
133824
|
}
|
|
133800
133825
|
function stringLiteralCompletionsFromProperties(type) {
|
|
133801
133826
|
return type && {
|
|
@@ -140734,7 +140759,7 @@ var ts;
|
|
|
140734
140759
|
}
|
|
140735
140760
|
}
|
|
140736
140761
|
function addReference(referenceLocation, relatedSymbol, state) {
|
|
140737
|
-
var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line no-in-operator
|
|
140762
|
+
var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line local/no-in-operator
|
|
140738
140763
|
// if rename symbol from default export anonymous function, for example `export default function() {}`, we do not need to add reference
|
|
140739
140764
|
if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) {
|
|
140740
140765
|
return;
|
|
@@ -146520,11 +146545,11 @@ var ts;
|
|
|
146520
146545
|
// not enough to put us in the substitution expression; we should consider ourselves part of
|
|
146521
146546
|
// the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1).
|
|
146522
146547
|
//
|
|
146523
|
-
/* eslint-disable no-double-space */
|
|
146548
|
+
/* eslint-disable local/no-double-space */
|
|
146524
146549
|
// Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # `
|
|
146525
146550
|
// ^ ^ ^ ^ ^ ^ ^ ^ ^
|
|
146526
146551
|
// Case: 1 1 3 2 1 3 2 2 1
|
|
146527
|
-
/* eslint-enable no-double-space */
|
|
146552
|
+
/* eslint-enable local/no-double-space */
|
|
146528
146553
|
ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node.");
|
|
146529
146554
|
if (ts.isTemplateLiteralToken(node)) {
|
|
146530
146555
|
if (ts.isInsideTemplateLiteral(node, position, sourceFile)) {
|
|
@@ -154545,7 +154570,7 @@ var ts;
|
|
|
154545
154570
|
name = getMapEntryOrDefault(funcNode.name);
|
|
154546
154571
|
}
|
|
154547
154572
|
// return undefined argName when arg is null or undefined
|
|
154548
|
-
// eslint-disable-next-line no-in-operator
|
|
154573
|
+
// eslint-disable-next-line local/no-in-operator
|
|
154549
154574
|
if (!name || "identifier" in name && name.identifier.text === "undefined") {
|
|
154550
154575
|
return undefined;
|
|
154551
154576
|
}
|
|
@@ -157813,11 +157838,10 @@ var ts;
|
|
|
157813
157838
|
return declaration && declaration.parent === node ? declaration : undefined;
|
|
157814
157839
|
}
|
|
157815
157840
|
function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) {
|
|
157816
|
-
if (ts.isTransientSymbol(symbol)
|
|
157817
|
-
var
|
|
157818
|
-
if (
|
|
157819
|
-
return
|
|
157820
|
-
}
|
|
157841
|
+
if (ts.isTransientSymbol(symbol)) {
|
|
157842
|
+
var prop = checker.symbolToNode(symbol, 111551 /* Value */, /*enclosingDeclaration*/ undefined, 1073741824 /* WriteComputedProps */);
|
|
157843
|
+
if (prop && ts.isComputedPropertyName(prop))
|
|
157844
|
+
return prop;
|
|
157821
157845
|
}
|
|
157822
157846
|
return ts.createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */);
|
|
157823
157847
|
}
|
|
@@ -166731,7 +166755,7 @@ var ts;
|
|
|
166731
166755
|
this.kind = kind;
|
|
166732
166756
|
}
|
|
166733
166757
|
NodeObject.prototype.assertHasRealPosition = function (message) {
|
|
166734
|
-
// eslint-disable-next-line debug-assert
|
|
166758
|
+
// eslint-disable-next-line local/debug-assert
|
|
166735
166759
|
ts.Debug.assert(!ts.positionIsSynthesized(this.pos) && !ts.positionIsSynthesized(this.end), message || "Node must have a real position for this operation");
|
|
166736
166760
|
};
|
|
166737
166761
|
NodeObject.prototype.getSourceFile = function () {
|
|
@@ -169775,7 +169799,7 @@ var debugObjectHost = (function () {
|
|
|
169775
169799
|
return this;
|
|
169776
169800
|
})();
|
|
169777
169801
|
// We need to use 'null' to interface with the managed side.
|
|
169778
|
-
/* eslint-disable no-in-operator */
|
|
169802
|
+
/* eslint-disable local/no-in-operator */
|
|
169779
169803
|
/* @internal */
|
|
169780
169804
|
var ts;
|
|
169781
169805
|
(function (ts) {
|
|
@@ -170575,7 +170599,7 @@ var ts;
|
|
|
170575
170599
|
}());
|
|
170576
170600
|
ts.TypeScriptServicesFactory = TypeScriptServicesFactory;
|
|
170577
170601
|
})(ts || (ts = {}));
|
|
170578
|
-
/* eslint-enable no-in-operator */
|
|
170602
|
+
/* eslint-enable local/no-in-operator */
|
|
170579
170603
|
// We polyfill `globalThis` here so re can reliably patch the global scope
|
|
170580
170604
|
// in the contexts we want to in the same way across script and module formats
|
|
170581
170605
|
/* eslint-enable no-var */
|
|
@@ -171345,7 +171369,7 @@ var ts;
|
|
|
171345
171369
|
if (typeof value === "number") {
|
|
171346
171370
|
return ts.factory.createNumericLiteral(value);
|
|
171347
171371
|
}
|
|
171348
|
-
// eslint-disable-next-line no-in-operator
|
|
171372
|
+
// eslint-disable-next-line local/no-in-operator
|
|
171349
171373
|
if (typeof value === "object" && "base10Value" in value) { // PseudoBigInt
|
|
171350
171374
|
return ts.factory.createBigIntLiteral(value);
|
|
171351
171375
|
}
|
|
@@ -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
|
/**
|