@typescript-deploys/pr-build 5.5.0-pr-57575-41 → 5.5.0-pr-57480-8
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 +24 -21
- package/lib/tsserver.js +137 -153
- package/lib/typescript.d.ts +653 -1090
- package/lib/typescript.js +178989 -178809
- package/lib/typingsInstaller.js +2 -2
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.5";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240304`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -1215,7 +1215,7 @@ function skipWhile(array, predicate) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
1217
|
function isNodeLikeSystem() {
|
|
1218
|
-
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof
|
|
1218
|
+
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof require !== "undefined";
|
|
1219
1219
|
}
|
|
1220
1220
|
|
|
1221
1221
|
// src/compiler/debug.ts
|
|
@@ -40996,7 +40996,7 @@ function createBinder() {
|
|
|
40996
40996
|
return Diagnostics.Invalid_use_of_0_in_strict_mode;
|
|
40997
40997
|
}
|
|
40998
40998
|
function checkStrictModeFunctionName(node) {
|
|
40999
|
-
if (inStrictMode) {
|
|
40999
|
+
if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {
|
|
41000
41000
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
41001
41001
|
}
|
|
41002
41002
|
}
|
|
@@ -44178,6 +44178,8 @@ function createTypeChecker(host) {
|
|
|
44178
44178
|
var comparableRelation = /* @__PURE__ */ new Map();
|
|
44179
44179
|
var identityRelation = /* @__PURE__ */ new Map();
|
|
44180
44180
|
var enumRelation = /* @__PURE__ */ new Map();
|
|
44181
|
+
var builtinGlobals = createSymbolTable();
|
|
44182
|
+
builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
|
|
44181
44183
|
var suggestedExtensions = [
|
|
44182
44184
|
[".mts", ".mjs"],
|
|
44183
44185
|
[".ts", ".js"],
|
|
@@ -44595,17 +44597,17 @@ function createTypeChecker(host) {
|
|
|
44595
44597
|
}
|
|
44596
44598
|
}
|
|
44597
44599
|
}
|
|
44598
|
-
function
|
|
44599
|
-
|
|
44600
|
-
|
|
44601
|
-
|
|
44602
|
-
|
|
44603
|
-
|
|
44604
|
-
|
|
44605
|
-
|
|
44606
|
-
|
|
44607
|
-
|
|
44608
|
-
|
|
44600
|
+
function addToSymbolTable(target, source, message) {
|
|
44601
|
+
source.forEach((sourceSymbol, id) => {
|
|
44602
|
+
const targetSymbol = target.get(id);
|
|
44603
|
+
if (targetSymbol) {
|
|
44604
|
+
forEach(targetSymbol.declarations, addDeclarationDiagnostic(unescapeLeadingUnderscores(id), message));
|
|
44605
|
+
} else {
|
|
44606
|
+
target.set(id, sourceSymbol);
|
|
44607
|
+
}
|
|
44608
|
+
});
|
|
44609
|
+
function addDeclarationDiagnostic(id, message2) {
|
|
44610
|
+
return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
44609
44611
|
}
|
|
44610
44612
|
}
|
|
44611
44613
|
function getSymbolLinks(symbol) {
|
|
@@ -74504,11 +74506,13 @@ function createTypeChecker(host) {
|
|
|
74504
74506
|
}
|
|
74505
74507
|
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
74506
74508
|
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
74507
|
-
|
|
74508
|
-
|
|
74509
|
-
|
|
74510
|
-
|
|
74511
|
-
|
|
74509
|
+
if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {
|
|
74510
|
+
const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);
|
|
74511
|
+
if (hasInstanceProperty) {
|
|
74512
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
74513
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
74514
|
+
return hasInstancePropertyType;
|
|
74515
|
+
}
|
|
74512
74516
|
}
|
|
74513
74517
|
}
|
|
74514
74518
|
}
|
|
@@ -79465,7 +79469,6 @@ function createTypeChecker(host) {
|
|
|
79465
79469
|
case "symbol":
|
|
79466
79470
|
case "void":
|
|
79467
79471
|
case "object":
|
|
79468
|
-
case "undefined":
|
|
79469
79472
|
error(name, message, name.escapedText);
|
|
79470
79473
|
}
|
|
79471
79474
|
}
|
|
@@ -83168,7 +83171,7 @@ function createTypeChecker(host) {
|
|
|
83168
83171
|
}
|
|
83169
83172
|
}
|
|
83170
83173
|
}
|
|
83171
|
-
|
|
83174
|
+
addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
|
|
83172
83175
|
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
|
|
83173
83176
|
getSymbolLinks(argumentsSymbol).type = getGlobalType(
|
|
83174
83177
|
"IArguments",
|
package/lib/tsserver.js
CHANGED
|
@@ -2325,7 +2325,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2325
2325
|
|
|
2326
2326
|
// src/compiler/corePublic.ts
|
|
2327
2327
|
var versionMajorMinor = "5.5";
|
|
2328
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2328
|
+
var version = `${versionMajorMinor}.0-insiders.20240304`;
|
|
2329
2329
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2330
2330
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2331
2331
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3936,7 +3936,7 @@ function skipWhile(array, predicate) {
|
|
|
3936
3936
|
}
|
|
3937
3937
|
}
|
|
3938
3938
|
function isNodeLikeSystem() {
|
|
3939
|
-
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof
|
|
3939
|
+
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof require !== "undefined";
|
|
3940
3940
|
}
|
|
3941
3941
|
|
|
3942
3942
|
// src/compiler/debug.ts
|
|
@@ -45661,7 +45661,7 @@ function createBinder() {
|
|
|
45661
45661
|
return Diagnostics.Invalid_use_of_0_in_strict_mode;
|
|
45662
45662
|
}
|
|
45663
45663
|
function checkStrictModeFunctionName(node) {
|
|
45664
|
-
if (inStrictMode) {
|
|
45664
|
+
if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) {
|
|
45665
45665
|
checkStrictModeEvalOrArguments(node, node.name);
|
|
45666
45666
|
}
|
|
45667
45667
|
}
|
|
@@ -48897,6 +48897,8 @@ function createTypeChecker(host) {
|
|
|
48897
48897
|
var comparableRelation = /* @__PURE__ */ new Map();
|
|
48898
48898
|
var identityRelation = /* @__PURE__ */ new Map();
|
|
48899
48899
|
var enumRelation = /* @__PURE__ */ new Map();
|
|
48900
|
+
var builtinGlobals = createSymbolTable();
|
|
48901
|
+
builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
|
|
48900
48902
|
var suggestedExtensions = [
|
|
48901
48903
|
[".mts", ".mjs"],
|
|
48902
48904
|
[".ts", ".js"],
|
|
@@ -49314,17 +49316,17 @@ function createTypeChecker(host) {
|
|
|
49314
49316
|
}
|
|
49315
49317
|
}
|
|
49316
49318
|
}
|
|
49317
|
-
function
|
|
49318
|
-
|
|
49319
|
-
|
|
49320
|
-
|
|
49321
|
-
|
|
49322
|
-
|
|
49323
|
-
|
|
49324
|
-
|
|
49325
|
-
|
|
49326
|
-
|
|
49327
|
-
|
|
49319
|
+
function addToSymbolTable(target, source, message) {
|
|
49320
|
+
source.forEach((sourceSymbol, id) => {
|
|
49321
|
+
const targetSymbol = target.get(id);
|
|
49322
|
+
if (targetSymbol) {
|
|
49323
|
+
forEach(targetSymbol.declarations, addDeclarationDiagnostic(unescapeLeadingUnderscores(id), message));
|
|
49324
|
+
} else {
|
|
49325
|
+
target.set(id, sourceSymbol);
|
|
49326
|
+
}
|
|
49327
|
+
});
|
|
49328
|
+
function addDeclarationDiagnostic(id, message2) {
|
|
49329
|
+
return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
|
|
49328
49330
|
}
|
|
49329
49331
|
}
|
|
49330
49332
|
function getSymbolLinks(symbol) {
|
|
@@ -79223,11 +79225,13 @@ function createTypeChecker(host) {
|
|
|
79223
79225
|
}
|
|
79224
79226
|
function getSymbolHasInstanceMethodOfObjectType(type) {
|
|
79225
79227
|
const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance");
|
|
79226
|
-
|
|
79227
|
-
|
|
79228
|
-
|
|
79229
|
-
|
|
79230
|
-
|
|
79228
|
+
if (allTypesAssignableToKind(type, 67108864 /* NonPrimitive */)) {
|
|
79229
|
+
const hasInstanceProperty = getPropertyOfType(type, hasInstancePropertyName);
|
|
79230
|
+
if (hasInstanceProperty) {
|
|
79231
|
+
const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty);
|
|
79232
|
+
if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) {
|
|
79233
|
+
return hasInstancePropertyType;
|
|
79234
|
+
}
|
|
79231
79235
|
}
|
|
79232
79236
|
}
|
|
79233
79237
|
}
|
|
@@ -84184,7 +84188,6 @@ function createTypeChecker(host) {
|
|
|
84184
84188
|
case "symbol":
|
|
84185
84189
|
case "void":
|
|
84186
84190
|
case "object":
|
|
84187
|
-
case "undefined":
|
|
84188
84191
|
error2(name, message, name.escapedText);
|
|
84189
84192
|
}
|
|
84190
84193
|
}
|
|
@@ -87887,7 +87890,7 @@ function createTypeChecker(host) {
|
|
|
87887
87890
|
}
|
|
87888
87891
|
}
|
|
87889
87892
|
}
|
|
87890
|
-
|
|
87893
|
+
addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
|
|
87891
87894
|
getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
|
|
87892
87895
|
getSymbolLinks(argumentsSymbol).type = getGlobalType(
|
|
87893
87896
|
"IArguments",
|
|
@@ -131106,17 +131109,17 @@ var SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationForma
|
|
|
131106
131109
|
SemanticClassificationFormat2["TwentyTwenty"] = "2020";
|
|
131107
131110
|
return SemanticClassificationFormat2;
|
|
131108
131111
|
})(SemanticClassificationFormat || {});
|
|
131109
|
-
var OrganizeImportsMode = /* @__PURE__ */ ((
|
|
131110
|
-
|
|
131111
|
-
|
|
131112
|
-
|
|
131113
|
-
return
|
|
131112
|
+
var OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode2) => {
|
|
131113
|
+
OrganizeImportsMode2["All"] = "All";
|
|
131114
|
+
OrganizeImportsMode2["SortAndCombine"] = "SortAndCombine";
|
|
131115
|
+
OrganizeImportsMode2["RemoveUnused"] = "RemoveUnused";
|
|
131116
|
+
return OrganizeImportsMode2;
|
|
131114
131117
|
})(OrganizeImportsMode || {});
|
|
131115
|
-
var CompletionTriggerKind = /* @__PURE__ */ ((
|
|
131116
|
-
|
|
131117
|
-
|
|
131118
|
-
|
|
131119
|
-
return
|
|
131118
|
+
var CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind3) => {
|
|
131119
|
+
CompletionTriggerKind3[CompletionTriggerKind3["Invoked"] = 1] = "Invoked";
|
|
131120
|
+
CompletionTriggerKind3[CompletionTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
131121
|
+
CompletionTriggerKind3[CompletionTriggerKind3["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
131122
|
+
return CompletionTriggerKind3;
|
|
131120
131123
|
})(CompletionTriggerKind || {});
|
|
131121
131124
|
var InlayHintKind = /* @__PURE__ */ ((InlayHintKind2) => {
|
|
131122
131125
|
InlayHintKind2["Type"] = "Type";
|
|
@@ -131137,11 +131140,11 @@ var IndentStyle = /* @__PURE__ */ ((IndentStyle3) => {
|
|
|
131137
131140
|
IndentStyle3[IndentStyle3["Smart"] = 2] = "Smart";
|
|
131138
131141
|
return IndentStyle3;
|
|
131139
131142
|
})(IndentStyle || {});
|
|
131140
|
-
var SemicolonPreference = /* @__PURE__ */ ((
|
|
131141
|
-
|
|
131142
|
-
|
|
131143
|
-
|
|
131144
|
-
return
|
|
131143
|
+
var SemicolonPreference = /* @__PURE__ */ ((SemicolonPreference2) => {
|
|
131144
|
+
SemicolonPreference2["Ignore"] = "ignore";
|
|
131145
|
+
SemicolonPreference2["Insert"] = "insert";
|
|
131146
|
+
SemicolonPreference2["Remove"] = "remove";
|
|
131147
|
+
return SemicolonPreference2;
|
|
131145
131148
|
})(SemicolonPreference || {});
|
|
131146
131149
|
function getDefaultFormatCodeSettings(newLineCharacter) {
|
|
131147
131150
|
return {
|
|
@@ -131339,33 +131342,33 @@ var ClassificationTypeNames = /* @__PURE__ */ ((ClassificationTypeNames2) => {
|
|
|
131339
131342
|
ClassificationTypeNames2["jsxAttributeStringLiteralValue"] = "jsx attribute string literal value";
|
|
131340
131343
|
return ClassificationTypeNames2;
|
|
131341
131344
|
})(ClassificationTypeNames || {});
|
|
131342
|
-
var ClassificationType = /* @__PURE__ */ ((
|
|
131343
|
-
|
|
131344
|
-
|
|
131345
|
-
|
|
131346
|
-
|
|
131347
|
-
|
|
131348
|
-
|
|
131349
|
-
|
|
131350
|
-
|
|
131351
|
-
|
|
131352
|
-
|
|
131353
|
-
|
|
131354
|
-
|
|
131355
|
-
|
|
131356
|
-
|
|
131357
|
-
|
|
131358
|
-
|
|
131359
|
-
|
|
131360
|
-
|
|
131361
|
-
|
|
131362
|
-
|
|
131363
|
-
|
|
131364
|
-
|
|
131365
|
-
|
|
131366
|
-
|
|
131367
|
-
|
|
131368
|
-
return
|
|
131345
|
+
var ClassificationType = /* @__PURE__ */ ((ClassificationType2) => {
|
|
131346
|
+
ClassificationType2[ClassificationType2["comment"] = 1] = "comment";
|
|
131347
|
+
ClassificationType2[ClassificationType2["identifier"] = 2] = "identifier";
|
|
131348
|
+
ClassificationType2[ClassificationType2["keyword"] = 3] = "keyword";
|
|
131349
|
+
ClassificationType2[ClassificationType2["numericLiteral"] = 4] = "numericLiteral";
|
|
131350
|
+
ClassificationType2[ClassificationType2["operator"] = 5] = "operator";
|
|
131351
|
+
ClassificationType2[ClassificationType2["stringLiteral"] = 6] = "stringLiteral";
|
|
131352
|
+
ClassificationType2[ClassificationType2["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
|
|
131353
|
+
ClassificationType2[ClassificationType2["whiteSpace"] = 8] = "whiteSpace";
|
|
131354
|
+
ClassificationType2[ClassificationType2["text"] = 9] = "text";
|
|
131355
|
+
ClassificationType2[ClassificationType2["punctuation"] = 10] = "punctuation";
|
|
131356
|
+
ClassificationType2[ClassificationType2["className"] = 11] = "className";
|
|
131357
|
+
ClassificationType2[ClassificationType2["enumName"] = 12] = "enumName";
|
|
131358
|
+
ClassificationType2[ClassificationType2["interfaceName"] = 13] = "interfaceName";
|
|
131359
|
+
ClassificationType2[ClassificationType2["moduleName"] = 14] = "moduleName";
|
|
131360
|
+
ClassificationType2[ClassificationType2["typeParameterName"] = 15] = "typeParameterName";
|
|
131361
|
+
ClassificationType2[ClassificationType2["typeAliasName"] = 16] = "typeAliasName";
|
|
131362
|
+
ClassificationType2[ClassificationType2["parameterName"] = 17] = "parameterName";
|
|
131363
|
+
ClassificationType2[ClassificationType2["docCommentTagName"] = 18] = "docCommentTagName";
|
|
131364
|
+
ClassificationType2[ClassificationType2["jsxOpenTagName"] = 19] = "jsxOpenTagName";
|
|
131365
|
+
ClassificationType2[ClassificationType2["jsxCloseTagName"] = 20] = "jsxCloseTagName";
|
|
131366
|
+
ClassificationType2[ClassificationType2["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
|
|
131367
|
+
ClassificationType2[ClassificationType2["jsxAttribute"] = 22] = "jsxAttribute";
|
|
131368
|
+
ClassificationType2[ClassificationType2["jsxText"] = 23] = "jsxText";
|
|
131369
|
+
ClassificationType2[ClassificationType2["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
|
|
131370
|
+
ClassificationType2[ClassificationType2["bigintLiteral"] = 25] = "bigintLiteral";
|
|
131371
|
+
return ClassificationType2;
|
|
131369
131372
|
})(ClassificationType || {});
|
|
131370
131373
|
|
|
131371
131374
|
// src/services/utilities.ts
|
|
@@ -158473,6 +158476,9 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
|
|
|
158473
158476
|
const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
|
|
158474
158477
|
if (memberCompletionEntry) {
|
|
158475
158478
|
({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry);
|
|
158479
|
+
if (memberCompletionEntry.eraseRange) {
|
|
158480
|
+
replacementSpan = createTextSpanFromBounds(memberCompletionEntry.eraseRange.pos, memberCompletionEntry.eraseRange.end);
|
|
158481
|
+
}
|
|
158476
158482
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
158477
158483
|
hasAction = true;
|
|
158478
158484
|
source = "ClassMemberSnippet/" /* ClassMemberSnippet */;
|
|
@@ -158554,7 +158560,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
158554
158560
|
}
|
|
158555
158561
|
let isSnippet;
|
|
158556
158562
|
let insertText = name;
|
|
158557
|
-
|
|
158563
|
+
let filterText = name;
|
|
158558
158564
|
const checker = program.getTypeChecker();
|
|
158559
158565
|
const sourceFile = location.getSourceFile();
|
|
158560
158566
|
const printer = createSnippetPrinter({
|
|
@@ -158583,7 +158589,10 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
158583
158589
|
);
|
|
158584
158590
|
}
|
|
158585
158591
|
let modifiers = 0 /* None */;
|
|
158586
|
-
const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position);
|
|
158592
|
+
const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators, filterText: modifiersFilterText } = getPresentModifiers(contextToken, sourceFile, position);
|
|
158593
|
+
if (modifiersFilterText) {
|
|
158594
|
+
filterText = modifiersFilterText + filterText;
|
|
158595
|
+
}
|
|
158587
158596
|
const isAbstract = presentModifiers & 64 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 64 /* Abstract */;
|
|
158588
158597
|
let completionNodes = [];
|
|
158589
158598
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -158668,21 +158677,31 @@ function getPresentModifiers(contextToken, sourceFile, position) {
|
|
|
158668
158677
|
}
|
|
158669
158678
|
let modifiers = 0 /* None */;
|
|
158670
158679
|
let decorators;
|
|
158671
|
-
let
|
|
158680
|
+
let filterTextEnd;
|
|
158681
|
+
const contextMod = isModifierLike2(contextToken);
|
|
158672
158682
|
const range = { pos: position, end: position };
|
|
158673
158683
|
if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) {
|
|
158674
158684
|
modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 98303 /* Modifier */;
|
|
158675
158685
|
decorators = contextToken.parent.modifiers.filter(isDecorator) || [];
|
|
158676
|
-
|
|
158686
|
+
const firstModifier = first(contextToken.parent.modifiers);
|
|
158687
|
+
if (firstModifier) {
|
|
158688
|
+
range.pos = Math.min(range.pos, firstModifier.getStart(sourceFile));
|
|
158689
|
+
if (contextToken.parent.name !== contextToken) {
|
|
158690
|
+
filterTextEnd = contextToken.parent.name.getStart(sourceFile);
|
|
158691
|
+
}
|
|
158692
|
+
}
|
|
158677
158693
|
}
|
|
158678
|
-
if (contextMod
|
|
158694
|
+
if (contextMod) {
|
|
158679
158695
|
const contextModifierFlag = modifierToFlag(contextMod);
|
|
158680
158696
|
if (!(modifiers & contextModifierFlag)) {
|
|
158681
158697
|
modifiers |= contextModifierFlag;
|
|
158682
|
-
range.pos = Math.min(range.pos, contextToken.
|
|
158698
|
+
range.pos = Math.min(range.pos, contextToken.getStart(sourceFile));
|
|
158683
158699
|
}
|
|
158684
158700
|
}
|
|
158685
|
-
|
|
158701
|
+
if (range.pos === position) {
|
|
158702
|
+
return { modifiers, decorators };
|
|
158703
|
+
}
|
|
158704
|
+
return { modifiers, decorators, range, filterText: sourceFile.text.slice(range.pos, filterTextEnd ?? position) };
|
|
158686
158705
|
}
|
|
158687
158706
|
function isModifierLike2(node) {
|
|
158688
158707
|
if (isModifier(node)) {
|
|
@@ -171120,6 +171139,8 @@ function getAllRules() {
|
|
|
171120
171139
|
rule("SpaceAfterSemicolon", 27 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),
|
|
171121
171140
|
// Remove extra space between for and await
|
|
171122
171141
|
rule("SpaceBetweenForAndAwaitKeyword", 99 /* ForKeyword */, 135 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),
|
|
171142
|
+
// Remove extra spaces between ... and type name in tuple spread
|
|
171143
|
+
rule("SpaceBetweenDotDotDotAndTypeName", 26 /* DotDotDotToken */, typeNames, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
|
|
171123
171144
|
// Add a space between statements. All keywords except (do,else,case) has open/close parens after them.
|
|
171124
171145
|
// So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any]
|
|
171125
171146
|
rule(
|
|
@@ -176289,18 +176310,18 @@ function removeSorted(array, remove, compare) {
|
|
|
176289
176310
|
// src/server/_namespaces/ts.server.protocol.ts
|
|
176290
176311
|
var ts_server_protocol_exports = {};
|
|
176291
176312
|
__export(ts_server_protocol_exports, {
|
|
176292
|
-
ClassificationType: () =>
|
|
176313
|
+
ClassificationType: () => ClassificationType,
|
|
176293
176314
|
CommandTypes: () => CommandTypes,
|
|
176294
|
-
CompletionTriggerKind: () =>
|
|
176315
|
+
CompletionTriggerKind: () => CompletionTriggerKind,
|
|
176295
176316
|
IndentStyle: () => IndentStyle2,
|
|
176296
176317
|
JsxEmit: () => JsxEmit2,
|
|
176297
176318
|
ModuleKind: () => ModuleKind2,
|
|
176298
176319
|
ModuleResolutionKind: () => ModuleResolutionKind2,
|
|
176299
176320
|
NewLineKind: () => NewLineKind2,
|
|
176300
|
-
OrganizeImportsMode: () =>
|
|
176321
|
+
OrganizeImportsMode: () => OrganizeImportsMode,
|
|
176301
176322
|
PollingWatchKind: () => PollingWatchKind2,
|
|
176302
176323
|
ScriptTarget: () => ScriptTarget10,
|
|
176303
|
-
SemicolonPreference: () =>
|
|
176324
|
+
SemicolonPreference: () => SemicolonPreference,
|
|
176304
176325
|
WatchDirectoryKind: () => WatchDirectoryKind2,
|
|
176305
176326
|
WatchFileKind: () => WatchFileKind2
|
|
176306
176327
|
});
|
|
@@ -176419,12 +176440,6 @@ var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => {
|
|
|
176419
176440
|
CommandTypes2["WatchChange"] = "watchChange";
|
|
176420
176441
|
return CommandTypes2;
|
|
176421
176442
|
})(CommandTypes || {});
|
|
176422
|
-
var OrganizeImportsMode2 = /* @__PURE__ */ ((OrganizeImportsMode3) => {
|
|
176423
|
-
OrganizeImportsMode3["All"] = "All";
|
|
176424
|
-
OrganizeImportsMode3["SortAndCombine"] = "SortAndCombine";
|
|
176425
|
-
OrganizeImportsMode3["RemoveUnused"] = "RemoveUnused";
|
|
176426
|
-
return OrganizeImportsMode3;
|
|
176427
|
-
})(OrganizeImportsMode2 || {});
|
|
176428
176443
|
var WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => {
|
|
176429
176444
|
WatchFileKind3["FixedPollingInterval"] = "FixedPollingInterval";
|
|
176430
176445
|
WatchFileKind3["PriorityPollingInterval"] = "PriorityPollingInterval";
|
|
@@ -176448,52 +176463,45 @@ var PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => {
|
|
|
176448
176463
|
PollingWatchKind3["FixedChunkSize"] = "FixedChunkSize";
|
|
176449
176464
|
return PollingWatchKind3;
|
|
176450
176465
|
})(PollingWatchKind2 || {});
|
|
176451
|
-
var CompletionTriggerKind2 = /* @__PURE__ */ ((CompletionTriggerKind4) => {
|
|
176452
|
-
CompletionTriggerKind4[CompletionTriggerKind4["Invoked"] = 1] = "Invoked";
|
|
176453
|
-
CompletionTriggerKind4[CompletionTriggerKind4["TriggerCharacter"] = 2] = "TriggerCharacter";
|
|
176454
|
-
CompletionTriggerKind4[CompletionTriggerKind4["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
|
|
176455
|
-
return CompletionTriggerKind4;
|
|
176456
|
-
})(CompletionTriggerKind2 || {});
|
|
176457
176466
|
var IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => {
|
|
176458
176467
|
IndentStyle3["None"] = "None";
|
|
176459
176468
|
IndentStyle3["Block"] = "Block";
|
|
176460
176469
|
IndentStyle3["Smart"] = "Smart";
|
|
176461
176470
|
return IndentStyle3;
|
|
176462
176471
|
})(IndentStyle2 || {});
|
|
176463
|
-
var SemicolonPreference2 = /* @__PURE__ */ ((SemicolonPreference3) => {
|
|
176464
|
-
SemicolonPreference3["Ignore"] = "ignore";
|
|
176465
|
-
SemicolonPreference3["Insert"] = "insert";
|
|
176466
|
-
SemicolonPreference3["Remove"] = "remove";
|
|
176467
|
-
return SemicolonPreference3;
|
|
176468
|
-
})(SemicolonPreference2 || {});
|
|
176469
176472
|
var JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => {
|
|
176470
|
-
JsxEmit3["None"] = "
|
|
176471
|
-
JsxEmit3["Preserve"] = "
|
|
176472
|
-
JsxEmit3["ReactNative"] = "
|
|
176473
|
-
JsxEmit3["React"] = "
|
|
176473
|
+
JsxEmit3["None"] = "none";
|
|
176474
|
+
JsxEmit3["Preserve"] = "preserve";
|
|
176475
|
+
JsxEmit3["ReactNative"] = "react-native";
|
|
176476
|
+
JsxEmit3["React"] = "react";
|
|
176477
|
+
JsxEmit3["ReactJSX"] = "react-jsx";
|
|
176478
|
+
JsxEmit3["ReactJSXDev"] = "react-jsxdev";
|
|
176474
176479
|
return JsxEmit3;
|
|
176475
176480
|
})(JsxEmit2 || {});
|
|
176476
176481
|
var ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => {
|
|
176477
|
-
ModuleKind3["None"] = "
|
|
176478
|
-
ModuleKind3["CommonJS"] = "
|
|
176479
|
-
ModuleKind3["AMD"] = "
|
|
176480
|
-
ModuleKind3["UMD"] = "
|
|
176481
|
-
ModuleKind3["System"] = "
|
|
176482
|
-
ModuleKind3["ES6"] = "
|
|
176483
|
-
ModuleKind3["ES2015"] = "
|
|
176484
|
-
ModuleKind3["
|
|
176485
|
-
ModuleKind3["
|
|
176486
|
-
ModuleKind3["
|
|
176487
|
-
ModuleKind3["
|
|
176482
|
+
ModuleKind3["None"] = "none";
|
|
176483
|
+
ModuleKind3["CommonJS"] = "commonjs";
|
|
176484
|
+
ModuleKind3["AMD"] = "amd";
|
|
176485
|
+
ModuleKind3["UMD"] = "umd";
|
|
176486
|
+
ModuleKind3["System"] = "system";
|
|
176487
|
+
ModuleKind3["ES6"] = "es6";
|
|
176488
|
+
ModuleKind3["ES2015"] = "es2015";
|
|
176489
|
+
ModuleKind3["ES2020"] = "es2020";
|
|
176490
|
+
ModuleKind3["ES2022"] = "es2022";
|
|
176491
|
+
ModuleKind3["ESNext"] = "esnext";
|
|
176492
|
+
ModuleKind3["Node16"] = "node16";
|
|
176493
|
+
ModuleKind3["NodeNext"] = "nodenext";
|
|
176494
|
+
ModuleKind3["Preserve"] = "preserve";
|
|
176488
176495
|
return ModuleKind3;
|
|
176489
176496
|
})(ModuleKind2 || {});
|
|
176490
176497
|
var ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => {
|
|
176491
|
-
ModuleResolutionKind3["Classic"] = "
|
|
176492
|
-
ModuleResolutionKind3["Node"] = "
|
|
176493
|
-
ModuleResolutionKind3["
|
|
176494
|
-
ModuleResolutionKind3["
|
|
176495
|
-
ModuleResolutionKind3["
|
|
176496
|
-
ModuleResolutionKind3["
|
|
176498
|
+
ModuleResolutionKind3["Classic"] = "classic";
|
|
176499
|
+
ModuleResolutionKind3["Node"] = "node";
|
|
176500
|
+
ModuleResolutionKind3["NodeJs"] = "node";
|
|
176501
|
+
ModuleResolutionKind3["Node10"] = "node10";
|
|
176502
|
+
ModuleResolutionKind3["Node16"] = "node16";
|
|
176503
|
+
ModuleResolutionKind3["NodeNext"] = "nodenext";
|
|
176504
|
+
ModuleResolutionKind3["Bundler"] = "bundler";
|
|
176497
176505
|
return ModuleResolutionKind3;
|
|
176498
176506
|
})(ModuleResolutionKind2 || {});
|
|
176499
176507
|
var NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => {
|
|
@@ -176502,48 +176510,24 @@ var NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => {
|
|
|
176502
176510
|
return NewLineKind3;
|
|
176503
176511
|
})(NewLineKind2 || {});
|
|
176504
176512
|
var ScriptTarget10 = /* @__PURE__ */ ((ScriptTarget11) => {
|
|
176505
|
-
ScriptTarget11["ES3"] = "
|
|
176506
|
-
ScriptTarget11["ES5"] = "
|
|
176507
|
-
ScriptTarget11["ES6"] = "
|
|
176508
|
-
ScriptTarget11["ES2015"] = "
|
|
176509
|
-
ScriptTarget11["ES2016"] = "
|
|
176510
|
-
ScriptTarget11["ES2017"] = "
|
|
176511
|
-
ScriptTarget11["ES2018"] = "
|
|
176512
|
-
ScriptTarget11["ES2019"] = "
|
|
176513
|
-
ScriptTarget11["ES2020"] = "
|
|
176514
|
-
ScriptTarget11["ES2021"] = "
|
|
176515
|
-
ScriptTarget11["ES2022"] = "
|
|
176516
|
-
ScriptTarget11["ESNext"] = "
|
|
176513
|
+
ScriptTarget11["ES3"] = "es3";
|
|
176514
|
+
ScriptTarget11["ES5"] = "es5";
|
|
176515
|
+
ScriptTarget11["ES6"] = "es6";
|
|
176516
|
+
ScriptTarget11["ES2015"] = "es2015";
|
|
176517
|
+
ScriptTarget11["ES2016"] = "es2016";
|
|
176518
|
+
ScriptTarget11["ES2017"] = "es2017";
|
|
176519
|
+
ScriptTarget11["ES2018"] = "es2018";
|
|
176520
|
+
ScriptTarget11["ES2019"] = "es2019";
|
|
176521
|
+
ScriptTarget11["ES2020"] = "es2020";
|
|
176522
|
+
ScriptTarget11["ES2021"] = "es2021";
|
|
176523
|
+
ScriptTarget11["ES2022"] = "es2022";
|
|
176524
|
+
ScriptTarget11["ESNext"] = "esnext";
|
|
176525
|
+
ScriptTarget11["JSON"] = "json";
|
|
176526
|
+
ScriptTarget11["Latest"] = "esnext" /* ESNext */;
|
|
176517
176527
|
return ScriptTarget11;
|
|
176518
176528
|
})(ScriptTarget10 || {});
|
|
176519
|
-
|
|
176520
|
-
|
|
176521
|
-
ClassificationType3[ClassificationType3["identifier"] = 2] = "identifier";
|
|
176522
|
-
ClassificationType3[ClassificationType3["keyword"] = 3] = "keyword";
|
|
176523
|
-
ClassificationType3[ClassificationType3["numericLiteral"] = 4] = "numericLiteral";
|
|
176524
|
-
ClassificationType3[ClassificationType3["operator"] = 5] = "operator";
|
|
176525
|
-
ClassificationType3[ClassificationType3["stringLiteral"] = 6] = "stringLiteral";
|
|
176526
|
-
ClassificationType3[ClassificationType3["regularExpressionLiteral"] = 7] = "regularExpressionLiteral";
|
|
176527
|
-
ClassificationType3[ClassificationType3["whiteSpace"] = 8] = "whiteSpace";
|
|
176528
|
-
ClassificationType3[ClassificationType3["text"] = 9] = "text";
|
|
176529
|
-
ClassificationType3[ClassificationType3["punctuation"] = 10] = "punctuation";
|
|
176530
|
-
ClassificationType3[ClassificationType3["className"] = 11] = "className";
|
|
176531
|
-
ClassificationType3[ClassificationType3["enumName"] = 12] = "enumName";
|
|
176532
|
-
ClassificationType3[ClassificationType3["interfaceName"] = 13] = "interfaceName";
|
|
176533
|
-
ClassificationType3[ClassificationType3["moduleName"] = 14] = "moduleName";
|
|
176534
|
-
ClassificationType3[ClassificationType3["typeParameterName"] = 15] = "typeParameterName";
|
|
176535
|
-
ClassificationType3[ClassificationType3["typeAliasName"] = 16] = "typeAliasName";
|
|
176536
|
-
ClassificationType3[ClassificationType3["parameterName"] = 17] = "parameterName";
|
|
176537
|
-
ClassificationType3[ClassificationType3["docCommentTagName"] = 18] = "docCommentTagName";
|
|
176538
|
-
ClassificationType3[ClassificationType3["jsxOpenTagName"] = 19] = "jsxOpenTagName";
|
|
176539
|
-
ClassificationType3[ClassificationType3["jsxCloseTagName"] = 20] = "jsxCloseTagName";
|
|
176540
|
-
ClassificationType3[ClassificationType3["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName";
|
|
176541
|
-
ClassificationType3[ClassificationType3["jsxAttribute"] = 22] = "jsxAttribute";
|
|
176542
|
-
ClassificationType3[ClassificationType3["jsxText"] = 23] = "jsxText";
|
|
176543
|
-
ClassificationType3[ClassificationType3["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue";
|
|
176544
|
-
ClassificationType3[ClassificationType3["bigintLiteral"] = 25] = "bigintLiteral";
|
|
176545
|
-
return ClassificationType3;
|
|
176546
|
-
})(ClassificationType2 || {});
|
|
176529
|
+
{
|
|
176530
|
+
}
|
|
176547
176531
|
|
|
176548
176532
|
// src/server/scriptInfo.ts
|
|
176549
176533
|
var TextStorage = class {
|