@typescript-deploys/pr-build 5.0.0-pr-52899-9 → 5.0.0-pr-49226-5
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 +90 -61
- package/lib/tsserver.js +91 -91
- package/lib/tsserverlibrary.js +91 -91
- package/lib/typescript.js +91 -91
- package/lib/typingsInstaller.js +81 -50
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.0";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230225`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -8176,12 +8176,10 @@ ${lanes.join("\n")}
|
|
|
8176
8176
|
The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
|
|
8177
8177
|
Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
|
|
8178
8178
|
Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
|
|
8179
|
-
|
|
8179
|
+
Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'es2015' or later."),
|
|
8180
8180
|
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
|
8181
8181
|
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
|
8182
8182
|
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
|
8183
|
-
Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(5099, 1 /* Error */, "Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Aster_5099", `Import assignment is not allowed when 'moduleResolution' is set to 'bundler'. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`),
|
|
8184
|
-
Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_default_or_another_module_format_instead: diag(5100, 1 /* Error */, "Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_defau_5100", "Export assignment cannot be used when 'moduleResolution' is set to 'bundler'. Consider using 'export default' or another module format instead."),
|
|
8185
8183
|
Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),
|
|
8186
8184
|
Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
|
|
8187
8185
|
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
|
@@ -9111,8 +9109,7 @@ ${lanes.join("\n")}
|
|
|
9111
9109
|
_0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
9112
9110
|
_0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
9113
9111
|
The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
9114
|
-
Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
|
|
9115
|
-
Add_missing_comma_for_an_object_member_completion_0: diag(18052, 3 /* Message */, "Add_missing_comma_for_an_object_member_completion_0_18052", "Add missing comma for an object member completion '{0}'.")
|
|
9112
|
+
Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string.")
|
|
9116
9113
|
};
|
|
9117
9114
|
}
|
|
9118
9115
|
});
|
|
@@ -28517,6 +28514,34 @@ ${lanes.join("\n")}
|
|
|
28517
28514
|
))
|
|
28518
28515
|
};
|
|
28519
28516
|
var factory2 = createNodeFactory(1 /* NoParenthesizerRules */ | 2 /* NoNodeConverters */ | 8 /* NoOriginalNode */, baseNodeFactory);
|
|
28517
|
+
var {
|
|
28518
|
+
createNodeArray: factoryCreateNodeArray,
|
|
28519
|
+
createNumericLiteral: factoryCreateNumericLiteral,
|
|
28520
|
+
createStringLiteral: factoryCreateStringLiteral,
|
|
28521
|
+
createLiteralLikeNode: factoryCreateLiteralLikeNode,
|
|
28522
|
+
createIdentifier: factoryCreateIdentifier,
|
|
28523
|
+
createPrivateIdentifier: factoryCreatePrivateIdentifier,
|
|
28524
|
+
createToken: factoryCreateToken,
|
|
28525
|
+
createArrayLiteralExpression: factoryCreateArrayLiteralExpression,
|
|
28526
|
+
createObjectLiteralExpression: factoryCreateObjectLiteralExpression,
|
|
28527
|
+
createPropertyAccessExpression: factoryCreatePropertyAccessExpression,
|
|
28528
|
+
createPropertyAccessChain: factoryCreatePropertyAccessChain,
|
|
28529
|
+
createElementAccessExpression: factoryCreateElementAccessExpression,
|
|
28530
|
+
createElementAccessChain: factoryCreateElementAccessChain,
|
|
28531
|
+
createCallExpression: factoryCreateCallExpression,
|
|
28532
|
+
createCallChain: factoryCreateCallChain,
|
|
28533
|
+
createNewExpression: factoryCreateNewExpression,
|
|
28534
|
+
createParenthesizedExpression: factoryCreateParenthesizedExpression,
|
|
28535
|
+
createBlock: factoryCreateBlock,
|
|
28536
|
+
createVariableStatement: factoryCreateVariableStatement,
|
|
28537
|
+
createExpressionStatement: factoryCreateExpressionStatement,
|
|
28538
|
+
createIfStatement: factoryCreateIfStatement,
|
|
28539
|
+
createWhileStatement: factoryCreateWhileStatement,
|
|
28540
|
+
createForStatement: factoryCreateForStatement,
|
|
28541
|
+
createForOfStatement: factoryCreateForOfStatement,
|
|
28542
|
+
createVariableDeclaration: factoryCreateVariableDeclaration,
|
|
28543
|
+
createVariableDeclarationList: factoryCreateVariableDeclarationList
|
|
28544
|
+
} = factory2;
|
|
28520
28545
|
var fileName;
|
|
28521
28546
|
var sourceFlags;
|
|
28522
28547
|
var sourceText;
|
|
@@ -28634,8 +28659,8 @@ ${lanes.join("\n")}
|
|
|
28634
28659
|
}
|
|
28635
28660
|
}
|
|
28636
28661
|
}
|
|
28637
|
-
const expression = isArray(expressions) ? finishNode(
|
|
28638
|
-
const statement =
|
|
28662
|
+
const expression = isArray(expressions) ? finishNode(factoryCreateArrayLiteralExpression(expressions), pos) : Debug.checkDefined(expressions);
|
|
28663
|
+
const statement = factoryCreateExpressionStatement(expression);
|
|
28639
28664
|
finishNode(statement, pos);
|
|
28640
28665
|
statements = createNodeArray([statement], pos);
|
|
28641
28666
|
endOfFileToken = parseExpectedToken(1 /* EndOfFileToken */, Diagnostics.Unexpected_token);
|
|
@@ -28818,7 +28843,7 @@ ${lanes.join("\n")}
|
|
|
28818
28843
|
}
|
|
28819
28844
|
}
|
|
28820
28845
|
syntaxCursor = savedSyntaxCursor;
|
|
28821
|
-
return factory2.updateSourceFile(sourceFile, setTextRange(
|
|
28846
|
+
return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements));
|
|
28822
28847
|
function containsPossibleTopLevelAwait(node) {
|
|
28823
28848
|
return !(node.flags & 32768 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */);
|
|
28824
28849
|
}
|
|
@@ -29259,13 +29284,13 @@ ${lanes.join("\n")}
|
|
|
29259
29284
|
const pos = getNodePos();
|
|
29260
29285
|
const kind = token();
|
|
29261
29286
|
nextToken();
|
|
29262
|
-
return finishNode(
|
|
29287
|
+
return finishNode(factoryCreateToken(kind), pos);
|
|
29263
29288
|
}
|
|
29264
29289
|
function parseTokenNodeJSDoc() {
|
|
29265
29290
|
const pos = getNodePos();
|
|
29266
29291
|
const kind = token();
|
|
29267
29292
|
nextTokenJSDoc();
|
|
29268
|
-
return finishNode(
|
|
29293
|
+
return finishNode(factoryCreateToken(kind), pos);
|
|
29269
29294
|
}
|
|
29270
29295
|
function canParseSemicolon() {
|
|
29271
29296
|
if (token() === 26 /* SemicolonToken */) {
|
|
@@ -29286,7 +29311,7 @@ ${lanes.join("\n")}
|
|
|
29286
29311
|
return tryParseSemicolon() || parseExpected(26 /* SemicolonToken */);
|
|
29287
29312
|
}
|
|
29288
29313
|
function createNodeArray(elements, pos, end, hasTrailingComma) {
|
|
29289
|
-
const array =
|
|
29314
|
+
const array = factoryCreateNodeArray(elements, hasTrailingComma);
|
|
29290
29315
|
setTextRangePosEnd(array, pos, end != null ? end : scanner2.getStartPos());
|
|
29291
29316
|
return array;
|
|
29292
29317
|
}
|
|
@@ -29308,7 +29333,7 @@ ${lanes.join("\n")}
|
|
|
29308
29333
|
parseErrorAtCurrentToken(diagnosticMessage, arg0);
|
|
29309
29334
|
}
|
|
29310
29335
|
const pos = getNodePos();
|
|
29311
|
-
const result = kind === 79 /* Identifier */ ?
|
|
29336
|
+
const result = kind === 79 /* Identifier */ ? factoryCreateIdentifier(
|
|
29312
29337
|
"",
|
|
29313
29338
|
/*originalKeywordKind*/
|
|
29314
29339
|
void 0
|
|
@@ -29318,15 +29343,15 @@ ${lanes.join("\n")}
|
|
|
29318
29343
|
"",
|
|
29319
29344
|
/*templateFlags*/
|
|
29320
29345
|
void 0
|
|
29321
|
-
) : kind === 8 /* NumericLiteral */ ?
|
|
29346
|
+
) : kind === 8 /* NumericLiteral */ ? factoryCreateNumericLiteral(
|
|
29322
29347
|
"",
|
|
29323
29348
|
/*numericLiteralFlags*/
|
|
29324
29349
|
void 0
|
|
29325
|
-
) : kind === 10 /* StringLiteral */ ?
|
|
29350
|
+
) : kind === 10 /* StringLiteral */ ? factoryCreateStringLiteral(
|
|
29326
29351
|
"",
|
|
29327
29352
|
/*isSingleQuote*/
|
|
29328
29353
|
void 0
|
|
29329
|
-
) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() :
|
|
29354
|
+
) : kind === 279 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind);
|
|
29330
29355
|
return finishNode(result, pos);
|
|
29331
29356
|
}
|
|
29332
29357
|
function internIdentifier(text) {
|
|
@@ -29344,7 +29369,7 @@ ${lanes.join("\n")}
|
|
|
29344
29369
|
const text = internIdentifier(scanner2.getTokenValue());
|
|
29345
29370
|
const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
|
|
29346
29371
|
nextTokenWithoutCheck();
|
|
29347
|
-
return finishNode(
|
|
29372
|
+
return finishNode(factoryCreateIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos);
|
|
29348
29373
|
}
|
|
29349
29374
|
if (token() === 80 /* PrivateIdentifier */) {
|
|
29350
29375
|
parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
|
|
@@ -29415,7 +29440,7 @@ ${lanes.join("\n")}
|
|
|
29415
29440
|
}
|
|
29416
29441
|
function parsePrivateIdentifier() {
|
|
29417
29442
|
const pos = getNodePos();
|
|
29418
|
-
const node =
|
|
29443
|
+
const node = factoryCreatePrivateIdentifier(internIdentifier(scanner2.getTokenValue()));
|
|
29419
29444
|
nextToken();
|
|
29420
29445
|
return finishNode(node, pos);
|
|
29421
29446
|
}
|
|
@@ -30130,12 +30155,12 @@ ${lanes.join("\n")}
|
|
|
30130
30155
|
// never get a token like this. Instead, we would get 00 and 9 as two separate tokens.
|
|
30131
30156
|
// We also do not need to check for negatives because any prefix operator would be part of a
|
|
30132
30157
|
// parent unary expression.
|
|
30133
|
-
kind === 8 /* NumericLiteral */ ?
|
|
30158
|
+
kind === 8 /* NumericLiteral */ ? factoryCreateNumericLiteral(scanner2.getTokenValue(), scanner2.getNumericLiteralFlags()) : kind === 10 /* StringLiteral */ ? factoryCreateStringLiteral(
|
|
30134
30159
|
scanner2.getTokenValue(),
|
|
30135
30160
|
/*isSingleQuote*/
|
|
30136
30161
|
void 0,
|
|
30137
30162
|
scanner2.hasExtendedUnicodeEscape()
|
|
30138
|
-
) : isLiteralKind(kind) ?
|
|
30163
|
+
) : isLiteralKind(kind) ? factoryCreateLiteralLikeNode(kind, scanner2.getTokenValue()) : Debug.fail()
|
|
30139
30164
|
);
|
|
30140
30165
|
if (scanner2.hasExtendedUnicodeEscape()) {
|
|
30141
30166
|
node.hasExtendedUnicodeEscape = true;
|
|
@@ -30726,7 +30751,7 @@ ${lanes.join("\n")}
|
|
|
30726
30751
|
if (token() === 126 /* AbstractKeyword */) {
|
|
30727
30752
|
const pos = getNodePos();
|
|
30728
30753
|
nextToken();
|
|
30729
|
-
const modifier = finishNode(
|
|
30754
|
+
const modifier = finishNode(factoryCreateToken(126 /* AbstractKeyword */), pos);
|
|
30730
30755
|
modifiers = createNodeArray([modifier], pos);
|
|
30731
30756
|
}
|
|
30732
30757
|
return modifiers;
|
|
@@ -31783,7 +31808,7 @@ ${lanes.join("\n")}
|
|
|
31783
31808
|
return expression;
|
|
31784
31809
|
}
|
|
31785
31810
|
parseExpectedToken(24 /* DotToken */, Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
|
|
31786
|
-
return finishNode(
|
|
31811
|
+
return finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(
|
|
31787
31812
|
/*allowIdentifierNames*/
|
|
31788
31813
|
true,
|
|
31789
31814
|
/*allowPrivateIdentifiers*/
|
|
@@ -31804,7 +31829,7 @@ ${lanes.join("\n")}
|
|
|
31804
31829
|
factory2.createJsxElement(
|
|
31805
31830
|
lastChild.openingElement,
|
|
31806
31831
|
lastChild.children,
|
|
31807
|
-
finishNode(factory2.createJsxClosingElement(finishNode(
|
|
31832
|
+
finishNode(factory2.createJsxClosingElement(finishNode(factoryCreateIdentifier(""), end, end)), end, end)
|
|
31808
31833
|
),
|
|
31809
31834
|
lastChild.openingElement.pos,
|
|
31810
31835
|
end
|
|
@@ -31947,7 +31972,7 @@ ${lanes.join("\n")}
|
|
|
31947
31972
|
scanJsxIdentifier();
|
|
31948
31973
|
let expression = token() === 108 /* ThisKeyword */ ? parseTokenNode() : parseIdentifierName();
|
|
31949
31974
|
while (parseOptional(24 /* DotToken */)) {
|
|
31950
|
-
expression = finishNode(
|
|
31975
|
+
expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(
|
|
31951
31976
|
/*allowIdentifierNames*/
|
|
31952
31977
|
true,
|
|
31953
31978
|
/*allowPrivateIdentifiers*/
|
|
@@ -32098,7 +32123,7 @@ ${lanes.join("\n")}
|
|
|
32098
32123
|
true
|
|
32099
32124
|
);
|
|
32100
32125
|
const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression);
|
|
32101
|
-
const propertyAccess = isOptionalChain2 ?
|
|
32126
|
+
const propertyAccess = isOptionalChain2 ? factoryCreatePropertyAccessChain(expression, questionDotToken, name) : factoryCreatePropertyAccessExpression(expression, name);
|
|
32102
32127
|
if (isOptionalChain2 && isPrivateIdentifier(propertyAccess.name)) {
|
|
32103
32128
|
parseErrorAtRange(propertyAccess.name, Diagnostics.An_optional_chain_cannot_contain_private_identifiers);
|
|
32104
32129
|
}
|
|
@@ -32126,7 +32151,7 @@ ${lanes.join("\n")}
|
|
|
32126
32151
|
argumentExpression = argument;
|
|
32127
32152
|
}
|
|
32128
32153
|
parseExpected(23 /* CloseBracketToken */);
|
|
32129
|
-
const indexedAccess = questionDotToken || tryReparseOptionalChain(expression) ?
|
|
32154
|
+
const indexedAccess = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateElementAccessChain(expression, questionDotToken, argumentExpression) : factoryCreateElementAccessExpression(expression, argumentExpression);
|
|
32130
32155
|
return finishNode(indexedAccess, pos);
|
|
32131
32156
|
}
|
|
32132
32157
|
function parseMemberExpressionRest(pos, expression, allowOptionalChain) {
|
|
@@ -32213,7 +32238,7 @@ ${lanes.join("\n")}
|
|
|
32213
32238
|
expression = expression.expression;
|
|
32214
32239
|
}
|
|
32215
32240
|
const argumentList = parseArgumentList();
|
|
32216
|
-
const callExpr = questionDotToken || tryReparseOptionalChain(expression) ?
|
|
32241
|
+
const callExpr = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateCallChain(expression, questionDotToken, typeArguments, argumentList) : factoryCreateCallExpression(expression, typeArguments, argumentList);
|
|
32217
32242
|
expression = finishNode(callExpr, pos);
|
|
32218
32243
|
continue;
|
|
32219
32244
|
}
|
|
@@ -32224,7 +32249,7 @@ ${lanes.join("\n")}
|
|
|
32224
32249
|
false,
|
|
32225
32250
|
Diagnostics.Identifier_expected
|
|
32226
32251
|
);
|
|
32227
|
-
expression = finishNode(
|
|
32252
|
+
expression = finishNode(factoryCreatePropertyAccessChain(expression, questionDotToken, name), pos);
|
|
32228
32253
|
}
|
|
32229
32254
|
break;
|
|
32230
32255
|
}
|
|
@@ -32319,7 +32344,7 @@ ${lanes.join("\n")}
|
|
|
32319
32344
|
parseExpected(20 /* OpenParenToken */);
|
|
32320
32345
|
const expression = allowInAnd(parseExpression);
|
|
32321
32346
|
parseExpected(21 /* CloseParenToken */);
|
|
32322
|
-
return withJSDoc(finishNode(
|
|
32347
|
+
return withJSDoc(finishNode(factoryCreateParenthesizedExpression(expression), pos), hasJSDoc);
|
|
32323
32348
|
}
|
|
32324
32349
|
function parseSpreadElement() {
|
|
32325
32350
|
const pos = getNodePos();
|
|
@@ -32346,7 +32371,7 @@ ${lanes.join("\n")}
|
|
|
32346
32371
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
32347
32372
|
const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement);
|
|
32348
32373
|
parseExpectedMatchingBrackets(22 /* OpenBracketToken */, 23 /* CloseBracketToken */, openBracketParsed, openBracketPosition);
|
|
32349
|
-
return finishNode(
|
|
32374
|
+
return finishNode(factoryCreateArrayLiteralExpression(elements, multiLine), pos);
|
|
32350
32375
|
}
|
|
32351
32376
|
function parseObjectLiteralElement() {
|
|
32352
32377
|
const pos = getNodePos();
|
|
@@ -32411,7 +32436,7 @@ ${lanes.join("\n")}
|
|
|
32411
32436
|
true
|
|
32412
32437
|
);
|
|
32413
32438
|
parseExpectedMatchingBrackets(18 /* OpenBraceToken */, 19 /* CloseBraceToken */, openBraceParsed, openBracePosition);
|
|
32414
|
-
return finishNode(
|
|
32439
|
+
return finishNode(factoryCreateObjectLiteralExpression(properties, multiLine), pos);
|
|
32415
32440
|
}
|
|
32416
32441
|
function parseFunctionExpression() {
|
|
32417
32442
|
const savedDecoratorContext = inDecoratorContext();
|
|
@@ -32468,7 +32493,7 @@ ${lanes.join("\n")}
|
|
|
32468
32493
|
parseErrorAtCurrentToken(Diagnostics.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, getTextOfNodeFromSourceText(sourceText, expression));
|
|
32469
32494
|
}
|
|
32470
32495
|
const argumentList = token() === 20 /* OpenParenToken */ ? parseArgumentList() : void 0;
|
|
32471
|
-
return finishNode(
|
|
32496
|
+
return finishNode(factoryCreateNewExpression(expression, typeArguments, argumentList), pos);
|
|
32472
32497
|
}
|
|
32473
32498
|
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
|
|
32474
32499
|
const pos = getNodePos();
|
|
@@ -32479,7 +32504,7 @@ ${lanes.join("\n")}
|
|
|
32479
32504
|
const multiLine = scanner2.hasPrecedingLineBreak();
|
|
32480
32505
|
const statements = parseList(1 /* BlockStatements */, parseStatement);
|
|
32481
32506
|
parseExpectedMatchingBrackets(18 /* OpenBraceToken */, 19 /* CloseBraceToken */, openBraceParsed, openBracePosition);
|
|
32482
|
-
const result = withJSDoc(finishNode(
|
|
32507
|
+
const result = withJSDoc(finishNode(factoryCreateBlock(statements, multiLine), pos), hasJSDoc);
|
|
32483
32508
|
if (token() === 63 /* EqualsToken */) {
|
|
32484
32509
|
parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses);
|
|
32485
32510
|
nextToken();
|
|
@@ -32487,7 +32512,7 @@ ${lanes.join("\n")}
|
|
|
32487
32512
|
return result;
|
|
32488
32513
|
} else {
|
|
32489
32514
|
const statements = createMissingList();
|
|
32490
|
-
return withJSDoc(finishNode(
|
|
32515
|
+
return withJSDoc(finishNode(factoryCreateBlock(
|
|
32491
32516
|
statements,
|
|
32492
32517
|
/*multiLine*/
|
|
32493
32518
|
void 0
|
|
@@ -32536,7 +32561,7 @@ ${lanes.join("\n")}
|
|
|
32536
32561
|
parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition);
|
|
32537
32562
|
const thenStatement = parseStatement();
|
|
32538
32563
|
const elseStatement = parseOptional(91 /* ElseKeyword */) ? parseStatement() : void 0;
|
|
32539
|
-
return withJSDoc(finishNode(
|
|
32564
|
+
return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc);
|
|
32540
32565
|
}
|
|
32541
32566
|
function parseDoStatement() {
|
|
32542
32567
|
const pos = getNodePos();
|
|
@@ -32560,7 +32585,7 @@ ${lanes.join("\n")}
|
|
|
32560
32585
|
const expression = allowInAnd(parseExpression);
|
|
32561
32586
|
parseExpectedMatchingBrackets(20 /* OpenParenToken */, 21 /* CloseParenToken */, openParenParsed, openParenPosition);
|
|
32562
32587
|
const statement = parseStatement();
|
|
32563
|
-
return withJSDoc(finishNode(
|
|
32588
|
+
return withJSDoc(finishNode(factoryCreateWhileStatement(expression, statement), pos), hasJSDoc);
|
|
32564
32589
|
}
|
|
32565
32590
|
function parseForOrForInOrForOfStatement() {
|
|
32566
32591
|
const pos = getNodePos();
|
|
@@ -32586,7 +32611,7 @@ ${lanes.join("\n")}
|
|
|
32586
32611
|
true
|
|
32587
32612
|
));
|
|
32588
32613
|
parseExpected(21 /* CloseParenToken */);
|
|
32589
|
-
node =
|
|
32614
|
+
node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement());
|
|
32590
32615
|
} else if (parseOptional(101 /* InKeyword */)) {
|
|
32591
32616
|
const expression = allowInAnd(parseExpression);
|
|
32592
32617
|
parseExpected(21 /* CloseParenToken */);
|
|
@@ -32597,7 +32622,7 @@ ${lanes.join("\n")}
|
|
|
32597
32622
|
parseExpected(26 /* SemicolonToken */);
|
|
32598
32623
|
const incrementor = token() !== 21 /* CloseParenToken */ ? allowInAnd(parseExpression) : void 0;
|
|
32599
32624
|
parseExpected(21 /* CloseParenToken */);
|
|
32600
|
-
node =
|
|
32625
|
+
node = factoryCreateForStatement(initializer, condition, incrementor, parseStatement());
|
|
32601
32626
|
}
|
|
32602
32627
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
32603
32628
|
}
|
|
@@ -32672,7 +32697,7 @@ ${lanes.join("\n")}
|
|
|
32672
32697
|
let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression);
|
|
32673
32698
|
if (expression === void 0) {
|
|
32674
32699
|
identifierCount++;
|
|
32675
|
-
expression = finishNode(
|
|
32700
|
+
expression = finishNode(factoryCreateIdentifier(""), getNodePos());
|
|
32676
32701
|
}
|
|
32677
32702
|
if (!tryParseSemicolon()) {
|
|
32678
32703
|
parseErrorForMissingSemicolonAfter(expression);
|
|
@@ -32733,7 +32758,7 @@ ${lanes.join("\n")}
|
|
|
32733
32758
|
if (!tryParseSemicolon()) {
|
|
32734
32759
|
parseErrorForMissingSemicolonAfter(expression);
|
|
32735
32760
|
}
|
|
32736
|
-
node =
|
|
32761
|
+
node = factoryCreateExpressionStatement(expression);
|
|
32737
32762
|
if (hasParen) {
|
|
32738
32763
|
hasJSDoc = false;
|
|
32739
32764
|
}
|
|
@@ -33131,7 +33156,7 @@ ${lanes.join("\n")}
|
|
|
33131
33156
|
}
|
|
33132
33157
|
const type = parseTypeAnnotation();
|
|
33133
33158
|
const initializer = isInOrOfKeyword(token()) ? void 0 : parseInitializer();
|
|
33134
|
-
const node =
|
|
33159
|
+
const node = factoryCreateVariableDeclaration(name, exclamationToken, type, initializer);
|
|
33135
33160
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
33136
33161
|
}
|
|
33137
33162
|
function parseVariableDeclarationList(inForStatementInitializer) {
|
|
@@ -33162,7 +33187,7 @@ ${lanes.join("\n")}
|
|
|
33162
33187
|
);
|
|
33163
33188
|
setDisallowInContext(savedDisallowIn);
|
|
33164
33189
|
}
|
|
33165
|
-
return finishNode(
|
|
33190
|
+
return finishNode(factoryCreateVariableDeclarationList(declarations, flags), pos);
|
|
33166
33191
|
}
|
|
33167
33192
|
function canFollowContextualOfKeyword() {
|
|
33168
33193
|
return nextTokenIsIdentifier() && nextToken() === 21 /* CloseParenToken */;
|
|
@@ -33173,7 +33198,7 @@ ${lanes.join("\n")}
|
|
|
33173
33198
|
false
|
|
33174
33199
|
);
|
|
33175
33200
|
parseSemicolon();
|
|
33176
|
-
const node =
|
|
33201
|
+
const node = factoryCreateVariableStatement(modifiers, declarationList);
|
|
33177
33202
|
return withJSDoc(finishNode(node, pos), hasJSDoc);
|
|
33178
33203
|
}
|
|
33179
33204
|
function parseFunctionDeclaration(pos, hasJSDoc, modifiers) {
|
|
@@ -33402,7 +33427,7 @@ ${lanes.join("\n")}
|
|
|
33402
33427
|
return void 0;
|
|
33403
33428
|
}
|
|
33404
33429
|
}
|
|
33405
|
-
return finishNode(
|
|
33430
|
+
return finishNode(factoryCreateToken(kind), pos);
|
|
33406
33431
|
}
|
|
33407
33432
|
function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
33408
33433
|
const pos = getNodePos();
|
|
@@ -33439,7 +33464,7 @@ ${lanes.join("\n")}
|
|
|
33439
33464
|
if (token() === 132 /* AsyncKeyword */) {
|
|
33440
33465
|
const pos = getNodePos();
|
|
33441
33466
|
nextToken();
|
|
33442
|
-
const modifier = finishNode(
|
|
33467
|
+
const modifier = finishNode(factoryCreateToken(132 /* AsyncKeyword */), pos);
|
|
33443
33468
|
modifiers = createNodeArray([modifier], pos);
|
|
33444
33469
|
}
|
|
33445
33470
|
return modifiers;
|
|
@@ -34026,7 +34051,7 @@ ${lanes.join("\n")}
|
|
|
34026
34051
|
/*isDeclarationFile*/
|
|
34027
34052
|
false,
|
|
34028
34053
|
[],
|
|
34029
|
-
|
|
34054
|
+
factoryCreateToken(1 /* EndOfFileToken */),
|
|
34030
34055
|
0 /* None */,
|
|
34031
34056
|
noop
|
|
34032
34057
|
);
|
|
@@ -34687,7 +34712,7 @@ ${lanes.join("\n")}
|
|
|
34687
34712
|
let node = parseJSDocIdentifierName();
|
|
34688
34713
|
while (parseOptional(24 /* DotToken */)) {
|
|
34689
34714
|
const name = parseJSDocIdentifierName();
|
|
34690
|
-
node = finishNode(
|
|
34715
|
+
node = finishNode(factoryCreatePropertyAccessExpression(node, name), pos);
|
|
34691
34716
|
}
|
|
34692
34717
|
return node;
|
|
34693
34718
|
}
|
|
@@ -34978,7 +35003,7 @@ ${lanes.join("\n")}
|
|
|
34978
35003
|
const end2 = scanner2.getTextPos();
|
|
34979
35004
|
const originalKeywordKind = token();
|
|
34980
35005
|
const text = internIdentifier(scanner2.getTokenValue());
|
|
34981
|
-
const result = finishNode(
|
|
35006
|
+
const result = finishNode(factoryCreateIdentifier(text, originalKeywordKind), pos, end2);
|
|
34982
35007
|
nextTokenJSDoc();
|
|
34983
35008
|
return result;
|
|
34984
35009
|
}
|
|
@@ -39065,10 +39090,13 @@ ${lanes.join("\n")}
|
|
|
39065
39090
|
return features;
|
|
39066
39091
|
}
|
|
39067
39092
|
function getConditions(options, esmMode) {
|
|
39068
|
-
const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["
|
|
39093
|
+
const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"];
|
|
39069
39094
|
if (!options.noDtsResolution) {
|
|
39070
39095
|
conditions.push("types");
|
|
39071
39096
|
}
|
|
39097
|
+
if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) {
|
|
39098
|
+
conditions.push("node");
|
|
39099
|
+
}
|
|
39072
39100
|
return concatenate(conditions, options.customConditions);
|
|
39073
39101
|
}
|
|
39074
39102
|
function resolvePackageNameToPackageJson(packageName, containingDirectory, options, host, cache) {
|
|
@@ -39782,7 +39810,7 @@ ${lanes.join("\n")}
|
|
|
39782
39810
|
isConfigLookup,
|
|
39783
39811
|
candidateIsFromPackageJsonField: false
|
|
39784
39812
|
};
|
|
39785
|
-
if (traceEnabled &&
|
|
39813
|
+
if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) {
|
|
39786
39814
|
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
39787
39815
|
}
|
|
39788
39816
|
let result;
|
|
@@ -48218,7 +48246,9 @@ ${lanes.join("\n")}
|
|
|
48218
48246
|
function getSuggestedImportSource(tsExtension) {
|
|
48219
48247
|
const importSourceWithoutExtension = removeExtension(moduleReference, tsExtension);
|
|
48220
48248
|
if (emitModuleKindIsNonNodeESM(moduleKind) || mode === 99 /* ESNext */) {
|
|
48221
|
-
|
|
48249
|
+
const preferTs = isDeclarationFileName(moduleReference) && shouldAllowImportingTsExtension(compilerOptions);
|
|
48250
|
+
const ext = tsExtension === ".mts" /* Mts */ || tsExtension === ".d.mts" /* Dmts */ ? preferTs ? ".mts" : ".mjs" : tsExtension === ".cts" /* Cts */ || tsExtension === ".d.mts" /* Dmts */ ? preferTs ? ".cts" : ".cjs" : preferTs ? ".ts" : ".js";
|
|
48251
|
+
return importSourceWithoutExtension + ext;
|
|
48222
48252
|
}
|
|
48223
48253
|
return importSourceWithoutExtension;
|
|
48224
48254
|
}
|
|
@@ -64042,7 +64072,7 @@ ${lanes.join("\n")}
|
|
|
64042
64072
|
return type.symbol;
|
|
64043
64073
|
}
|
|
64044
64074
|
if (isTupleType(type)) {
|
|
64045
|
-
return type
|
|
64075
|
+
return type;
|
|
64046
64076
|
}
|
|
64047
64077
|
}
|
|
64048
64078
|
if (type.flags & 262144 /* TypeParameter */) {
|
|
@@ -81211,8 +81241,6 @@ ${lanes.join("\n")}
|
|
|
81211
81241
|
} else {
|
|
81212
81242
|
if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 16777216 /* Ambient */)) {
|
|
81213
81243
|
grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);
|
|
81214
|
-
} else if (!(node.flags & 16777216 /* Ambient */) && getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */) {
|
|
81215
|
-
grammarErrorOnNode(node, Diagnostics.Import_assignment_is_not_allowed_when_moduleResolution_is_set_to_bundler_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);
|
|
81216
81244
|
}
|
|
81217
81245
|
}
|
|
81218
81246
|
}
|
|
@@ -81419,8 +81447,6 @@ ${lanes.join("\n")}
|
|
|
81419
81447
|
grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead);
|
|
81420
81448
|
} else if (moduleKind === 4 /* System */ && !(node.flags & 16777216 /* Ambient */)) {
|
|
81421
81449
|
grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system);
|
|
81422
|
-
} else if (getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */ && !(node.flags & 16777216 /* Ambient */)) {
|
|
81423
|
-
grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_moduleResolution_is_set_to_bundler_Consider_using_export_default_or_another_module_format_instead);
|
|
81424
81450
|
}
|
|
81425
81451
|
}
|
|
81426
81452
|
}
|
|
@@ -118103,10 +118129,10 @@ ${lanes.join("\n")}
|
|
|
118103
118129
|
}
|
|
118104
118130
|
}
|
|
118105
118131
|
if (options.preserveValueImports && getEmitModuleKind(options) < 5 /* ES2015 */) {
|
|
118106
|
-
createDiagnosticForOptionName(Diagnostics.
|
|
118132
|
+
createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "preserveValueImports");
|
|
118107
118133
|
}
|
|
118134
|
+
const moduleKind = getEmitModuleKind(options);
|
|
118108
118135
|
if (options.verbatimModuleSyntax) {
|
|
118109
|
-
const moduleKind = getEmitModuleKind(options);
|
|
118110
118136
|
if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) {
|
|
118111
118137
|
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
|
|
118112
118138
|
}
|
|
@@ -118125,13 +118151,16 @@ ${lanes.join("\n")}
|
|
|
118125
118151
|
}
|
|
118126
118152
|
const moduleResolution = getEmitModuleResolutionKind(options);
|
|
118127
118153
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
118128
|
-
|
|
118154
|
+
createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports");
|
|
118129
118155
|
}
|
|
118130
118156
|
if (options.resolvePackageJsonImports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
118131
|
-
|
|
118157
|
+
createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports");
|
|
118132
118158
|
}
|
|
118133
118159
|
if (options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
118134
|
-
|
|
118160
|
+
createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions");
|
|
118161
|
+
}
|
|
118162
|
+
if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) {
|
|
118163
|
+
createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler");
|
|
118135
118164
|
}
|
|
118136
118165
|
if (!options.noEmit && !options.suppressOutputPathCheck) {
|
|
118137
118166
|
const emitHost = getEmitHost();
|
|
@@ -147944,7 +147973,6 @@ ${lanes.join("\n")}
|
|
|
147944
147973
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
147945
147974
|
}
|
|
147946
147975
|
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) {
|
|
147947
|
-
var _a2;
|
|
147948
147976
|
let insertText;
|
|
147949
147977
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
147950
147978
|
let data;
|
|
@@ -148002,10 +148030,6 @@ ${lanes.join("\n")}
|
|
|
148002
148030
|
if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) {
|
|
148003
148031
|
hasAction = true;
|
|
148004
148032
|
}
|
|
148005
|
-
if (contextToken && isPropertyAssignment(contextToken.parent) && ((_a2 = findNextToken(contextToken, contextToken == null ? void 0 : contextToken.parent, sourceFile)) == null ? void 0 : _a2.kind) !== 27 /* CommaToken */ && completionKind === 0 /* ObjectPropertyDeclaration */) {
|
|
148006
|
-
source = "ObjectLiteralExpression/" /* ObjectLiteralExpression */;
|
|
148007
|
-
hasAction = true;
|
|
148008
|
-
}
|
|
148009
148033
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
148010
148034
|
let importAdder;
|
|
148011
148035
|
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
@@ -148694,7 +148718,7 @@ ${lanes.join("\n")}
|
|
|
148694
148718
|
return firstDefined(symbols, (symbol, index) => {
|
|
148695
148719
|
const origin = symbolToOriginInfoMap[index];
|
|
148696
148720
|
const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
|
|
148697
|
-
return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source
|
|
148721
|
+
return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
|
|
148698
148722
|
}) || { type: "none" };
|
|
148699
148723
|
}
|
|
148700
148724
|
function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) {
|
|
@@ -148832,21 +148856,6 @@ ${lanes.join("\n")}
|
|
|
148832
148856
|
Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias");
|
|
148833
148857
|
return { codeActions: [codeAction2], sourceDisplay: void 0 };
|
|
148834
148858
|
}
|
|
148835
|
-
if (source === "ObjectLiteralExpression/" /* ObjectLiteralExpression */ && contextToken) {
|
|
148836
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
148837
|
-
{ host, formatContext, preferences },
|
|
148838
|
-
(tracker) => tracker.insertText(sourceFile, contextToken.end, ",")
|
|
148839
|
-
);
|
|
148840
|
-
if (changes) {
|
|
148841
|
-
return {
|
|
148842
|
-
sourceDisplay: void 0,
|
|
148843
|
-
codeActions: [{
|
|
148844
|
-
changes,
|
|
148845
|
-
description: diagnosticToString([Diagnostics.Add_missing_comma_for_an_object_member_completion_0, name])
|
|
148846
|
-
}]
|
|
148847
|
-
};
|
|
148848
|
-
}
|
|
148849
|
-
}
|
|
148850
148859
|
if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) {
|
|
148851
148860
|
return { codeActions: void 0, sourceDisplay: void 0 };
|
|
148852
148861
|
}
|
|
@@ -150245,10 +150254,6 @@ ${lanes.join("\n")}
|
|
|
150245
150254
|
return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0;
|
|
150246
150255
|
case 79 /* Identifier */:
|
|
150247
150256
|
return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0;
|
|
150248
|
-
default:
|
|
150249
|
-
if (parent2.parent && isObjectLiteralExpression(parent2.parent) && contextToken.kind !== 58 /* ColonToken */) {
|
|
150250
|
-
return parent2.parent;
|
|
150251
|
-
}
|
|
150252
150257
|
}
|
|
150253
150258
|
}
|
|
150254
150259
|
return void 0;
|
|
@@ -150789,7 +150794,6 @@ ${lanes.join("\n")}
|
|
|
150789
150794
|
CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/";
|
|
150790
150795
|
CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
|
|
150791
150796
|
CompletionSource2["SwitchCases"] = "SwitchCases/";
|
|
150792
|
-
CompletionSource2["ObjectLiteralExpression"] = "ObjectLiteralExpression/";
|
|
150793
150797
|
return CompletionSource2;
|
|
150794
150798
|
})(CompletionSource || {});
|
|
150795
150799
|
SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {
|
|
@@ -163783,10 +163787,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163783
163787
|
const suffix = this.nextCommaToken(sourceFile, oldNode) ? "" : "," + this.newLineCharacter;
|
|
163784
163788
|
this.replaceNode(sourceFile, oldNode, newNode, { suffix });
|
|
163785
163789
|
}
|
|
163786
|
-
replacePropertyAssignmentOnSameLine(sourceFile, oldNode, newNode) {
|
|
163787
|
-
const suffix = this.nextCommaToken(sourceFile, oldNode) ? "" : ",";
|
|
163788
|
-
this.replaceNode(sourceFile, oldNode, newNode, { suffix });
|
|
163789
|
-
}
|
|
163790
163790
|
insertNodeAt(sourceFile, pos, newNode, options = {}) {
|
|
163791
163791
|
this.replaceRange(sourceFile, createRange(pos), newNode, options);
|
|
163792
163792
|
}
|