typescript 5.0.0-dev.20230112 → 5.0.0-dev.20230114
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/lib.es2023.array.d.ts +344 -0
- package/lib/lib.es2023.d.ts +22 -0
- package/lib/lib.es2023.full.d.ts +25 -0
- package/lib/lib.esnext.d.ts +1 -1
- package/lib/tsc.js +271 -246
- package/lib/tsserver.js +360 -265
- package/lib/tsserverlibrary.d.ts +11 -2
- package/lib/tsserverlibrary.js +360 -266
- package/lib/typescript.d.ts +11 -2
- package/lib/typescript.js +351 -266
- package/lib/typingsInstaller.js +102 -161
- package/package.json +5 -2
package/lib/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230114`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3980,6 +3980,8 @@ ${lanes.join("\n")}
|
|
|
3980
3980
|
NodeFlags4[NodeFlags4["ContextFlags"] = 50720768] = "ContextFlags";
|
|
3981
3981
|
NodeFlags4[NodeFlags4["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags";
|
|
3982
3982
|
NodeFlags4[NodeFlags4["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags";
|
|
3983
|
+
NodeFlags4[NodeFlags4["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape";
|
|
3984
|
+
NodeFlags4[NodeFlags4["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace";
|
|
3983
3985
|
return NodeFlags4;
|
|
3984
3986
|
})(NodeFlags || {});
|
|
3985
3987
|
ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
@@ -8405,6 +8407,8 @@ ${lanes.join("\n")}
|
|
|
8405
8407
|
package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, 3 /* Message */, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."),
|
|
8406
8408
|
package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, 3 /* Message */, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"),
|
|
8407
8409
|
Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, 3 /* Message */, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."),
|
|
8410
|
+
Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: diag(6277, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),
|
|
8411
|
+
There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),
|
|
8408
8412
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
8409
8413
|
Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* Error */, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
|
|
8410
8414
|
Output_file_0_has_not_been_built_from_source_file_1: diag(6305, 1 /* Error */, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
|
|
@@ -11478,6 +11482,10 @@ ${lanes.join("\n")}
|
|
|
11478
11482
|
function idText(identifierOrPrivateName) {
|
|
11479
11483
|
return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText);
|
|
11480
11484
|
}
|
|
11485
|
+
function identifierToKeywordKind(node) {
|
|
11486
|
+
const token = stringToToken(node.escapedText);
|
|
11487
|
+
return token ? tryCast(token, isKeyword) : void 0;
|
|
11488
|
+
}
|
|
11481
11489
|
function symbolName(symbol) {
|
|
11482
11490
|
if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {
|
|
11483
11491
|
return idText(symbol.valueDeclaration.name);
|
|
@@ -11785,15 +11793,17 @@ ${lanes.join("\n")}
|
|
|
11785
11793
|
}
|
|
11786
11794
|
}
|
|
11787
11795
|
function getJSDocTagsWorker(node, noCache) {
|
|
11796
|
+
var _a2, _b;
|
|
11788
11797
|
if (!canHaveJSDoc(node))
|
|
11789
11798
|
return emptyArray;
|
|
11790
|
-
let tags = node.jsDocCache;
|
|
11799
|
+
let tags = (_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache;
|
|
11791
11800
|
if (tags === void 0 || noCache) {
|
|
11792
11801
|
const comments = getJSDocCommentsAndTags(node, noCache);
|
|
11793
11802
|
Debug.assert(comments.length < 2 || comments[0] !== comments[1]);
|
|
11794
11803
|
tags = flatMap(comments, (j) => isJSDoc(j) ? j.tags : j);
|
|
11795
11804
|
if (!noCache) {
|
|
11796
|
-
node.
|
|
11805
|
+
(_b = node.jsDoc) != null ? _b : node.jsDoc = [];
|
|
11806
|
+
node.jsDoc.jsDocCache = tags;
|
|
11797
11807
|
}
|
|
11798
11808
|
}
|
|
11799
11809
|
return tags;
|
|
@@ -11992,10 +12002,12 @@ ${lanes.join("\n")}
|
|
|
11992
12002
|
return node.kind === 10 /* StringLiteral */ || isTemplateLiteralKind(node.kind);
|
|
11993
12003
|
}
|
|
11994
12004
|
function isGeneratedIdentifier(node) {
|
|
11995
|
-
|
|
12005
|
+
var _a2;
|
|
12006
|
+
return isIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
|
|
11996
12007
|
}
|
|
11997
12008
|
function isGeneratedPrivateIdentifier(node) {
|
|
11998
|
-
|
|
12009
|
+
var _a2;
|
|
12010
|
+
return isPrivateIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
|
|
11999
12011
|
}
|
|
12000
12012
|
function isPrivateIdentifierClassElementDeclaration(node) {
|
|
12001
12013
|
return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);
|
|
@@ -13373,10 +13385,11 @@ ${lanes.join("\n")}
|
|
|
13373
13385
|
return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
|
|
13374
13386
|
}
|
|
13375
13387
|
function tryGetTextOfPropertyName(name) {
|
|
13388
|
+
var _a2;
|
|
13376
13389
|
switch (name.kind) {
|
|
13377
13390
|
case 79 /* Identifier */:
|
|
13378
13391
|
case 80 /* PrivateIdentifier */:
|
|
13379
|
-
return name.autoGenerate ? void 0 : name.escapedText;
|
|
13392
|
+
return ((_a2 = name.emitNode) == null ? void 0 : _a2.autoGenerate) ? void 0 : name.escapedText;
|
|
13380
13393
|
case 10 /* StringLiteral */:
|
|
13381
13394
|
case 8 /* NumericLiteral */:
|
|
13382
13395
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
@@ -13494,6 +13507,20 @@ ${lanes.join("\n")}
|
|
|
13494
13507
|
const start = scanner2.getTokenPos();
|
|
13495
13508
|
return createTextSpanFromBounds(start, scanner2.getTextPos());
|
|
13496
13509
|
}
|
|
13510
|
+
function scanTokenAtPosition(sourceFile, pos) {
|
|
13511
|
+
const scanner2 = createScanner(
|
|
13512
|
+
sourceFile.languageVersion,
|
|
13513
|
+
/*skipTrivia*/
|
|
13514
|
+
true,
|
|
13515
|
+
sourceFile.languageVariant,
|
|
13516
|
+
sourceFile.text,
|
|
13517
|
+
/*onError:*/
|
|
13518
|
+
void 0,
|
|
13519
|
+
pos
|
|
13520
|
+
);
|
|
13521
|
+
scanner2.scan();
|
|
13522
|
+
return scanner2.getToken();
|
|
13523
|
+
}
|
|
13497
13524
|
function getErrorSpanForArrowFunction(sourceFile, node) {
|
|
13498
13525
|
const pos = skipTrivia(sourceFile.text, node.pos);
|
|
13499
13526
|
if (node.body && node.body.kind === 238 /* Block */) {
|
|
@@ -15176,7 +15203,8 @@ ${lanes.join("\n")}
|
|
|
15176
15203
|
const token = stringToToken(name);
|
|
15177
15204
|
return token !== void 0 && isKeyword(token);
|
|
15178
15205
|
}
|
|
15179
|
-
function isIdentifierANonContextualKeyword(
|
|
15206
|
+
function isIdentifierANonContextualKeyword(node) {
|
|
15207
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
15180
15208
|
return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind);
|
|
15181
15209
|
}
|
|
15182
15210
|
function isTrivia(token) {
|
|
@@ -15975,7 +16003,7 @@ ${lanes.join("\n")}
|
|
|
15975
16003
|
return node.parent.kind === 183 /* TypeQuery */;
|
|
15976
16004
|
}
|
|
15977
16005
|
function identifierIsThisKeyword(id) {
|
|
15978
|
-
return id.
|
|
16006
|
+
return id.escapedText === "this";
|
|
15979
16007
|
}
|
|
15980
16008
|
function getAllAccessorDeclarations(declarations, accessor) {
|
|
15981
16009
|
let firstAccessor;
|
|
@@ -16286,7 +16314,7 @@ ${lanes.join("\n")}
|
|
|
16286
16314
|
}
|
|
16287
16315
|
function getSyntacticModifierFlagsNoCache(node) {
|
|
16288
16316
|
let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;
|
|
16289
|
-
if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.
|
|
16317
|
+
if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
16290
16318
|
flags |= 1 /* Export */;
|
|
16291
16319
|
}
|
|
16292
16320
|
return flags;
|
|
@@ -17049,15 +17077,19 @@ ${lanes.join("\n")}
|
|
|
17049
17077
|
this.parent = void 0;
|
|
17050
17078
|
this.original = void 0;
|
|
17051
17079
|
this.emitNode = void 0;
|
|
17052
|
-
this.flowNode = void 0;
|
|
17053
17080
|
}
|
|
17054
17081
|
function SourceMapSource(fileName, text, skipTrivia2) {
|
|
17055
17082
|
this.fileName = fileName;
|
|
17056
17083
|
this.text = text;
|
|
17057
17084
|
this.skipTrivia = skipTrivia2 || ((pos) => pos);
|
|
17058
17085
|
}
|
|
17086
|
+
function addObjectAllocatorPatcher(fn) {
|
|
17087
|
+
objectAllocatorPatchers.push(fn);
|
|
17088
|
+
fn(objectAllocator);
|
|
17089
|
+
}
|
|
17059
17090
|
function setObjectAllocator(alloc) {
|
|
17060
17091
|
Object.assign(objectAllocator, alloc);
|
|
17092
|
+
forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator));
|
|
17061
17093
|
}
|
|
17062
17094
|
function formatStringFromArgs(text, args, baseIndex = 0) {
|
|
17063
17095
|
return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
|
|
@@ -18403,7 +18435,7 @@ ${lanes.join("\n")}
|
|
|
18403
18435
|
const kind = node.kind;
|
|
18404
18436
|
return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
|
|
18405
18437
|
}
|
|
18406
|
-
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18438
|
+
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
|
|
18407
18439
|
var init_utilities = __esm({
|
|
18408
18440
|
"src/compiler/utilities.ts"() {
|
|
18409
18441
|
"use strict";
|
|
@@ -18524,6 +18556,7 @@ ${lanes.join("\n")}
|
|
|
18524
18556
|
getSignatureConstructor: () => Signature2,
|
|
18525
18557
|
getSourceMapSourceConstructor: () => SourceMapSource
|
|
18526
18558
|
};
|
|
18559
|
+
objectAllocatorPatchers = [];
|
|
18527
18560
|
reservedCharacterPattern = /[^\w\s\/]/g;
|
|
18528
18561
|
wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
|
|
18529
18562
|
commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
|
|
@@ -19211,7 +19244,6 @@ ${lanes.join("\n")}
|
|
|
19211
19244
|
createRegularExpressionLiteral: createRegularExpressionLiteral2,
|
|
19212
19245
|
createLiteralLikeNode,
|
|
19213
19246
|
createIdentifier: createIdentifier3,
|
|
19214
|
-
updateIdentifier,
|
|
19215
19247
|
createTempVariable: createTempVariable3,
|
|
19216
19248
|
createLoopVariable: createLoopVariable2,
|
|
19217
19249
|
createUniqueName: createUniqueName2,
|
|
@@ -19954,55 +19986,43 @@ ${lanes.join("\n")}
|
|
|
19954
19986
|
);
|
|
19955
19987
|
}
|
|
19956
19988
|
}
|
|
19957
|
-
function createBaseIdentifier(escapedText
|
|
19989
|
+
function createBaseIdentifier(escapedText) {
|
|
19958
19990
|
const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
|
|
19959
|
-
node.originalKeywordKind = originalKeywordKind;
|
|
19960
19991
|
node.escapedText = escapedText;
|
|
19961
|
-
node.autoGenerate = void 0;
|
|
19962
|
-
node.typeArguments = void 0;
|
|
19963
|
-
node.hasExtendedUnicodeEscape = void 0;
|
|
19964
19992
|
node.jsDoc = void 0;
|
|
19965
|
-
node.jsDocCache = void 0;
|
|
19966
19993
|
node.flowNode = void 0;
|
|
19967
19994
|
node.symbol = void 0;
|
|
19968
19995
|
return node;
|
|
19969
19996
|
}
|
|
19970
19997
|
function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
19971
|
-
const node = createBaseIdentifier(
|
|
19972
|
-
|
|
19973
|
-
/*originalKeywordKind*/
|
|
19974
|
-
void 0
|
|
19975
|
-
);
|
|
19976
|
-
node.autoGenerate = {
|
|
19998
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text));
|
|
19999
|
+
setIdentifierAutoGenerate(node, {
|
|
19977
20000
|
flags: autoGenerateFlags,
|
|
19978
20001
|
id: nextAutoGenerateId,
|
|
19979
20002
|
prefix,
|
|
19980
20003
|
suffix
|
|
19981
|
-
};
|
|
20004
|
+
});
|
|
19982
20005
|
nextAutoGenerateId++;
|
|
19983
20006
|
return node;
|
|
19984
20007
|
}
|
|
19985
|
-
function createIdentifier3(text,
|
|
20008
|
+
function createIdentifier3(text, originalKeywordKind, hasExtendedUnicodeEscape) {
|
|
19986
20009
|
if (originalKeywordKind === void 0 && text) {
|
|
19987
20010
|
originalKeywordKind = stringToToken(text);
|
|
19988
20011
|
}
|
|
19989
20012
|
if (originalKeywordKind === 79 /* Identifier */) {
|
|
19990
20013
|
originalKeywordKind = void 0;
|
|
19991
20014
|
}
|
|
19992
|
-
const node = createBaseIdentifier(escapeLeadingUnderscores(text)
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
if (node.
|
|
20015
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text));
|
|
20016
|
+
if (hasExtendedUnicodeEscape)
|
|
20017
|
+
node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */;
|
|
20018
|
+
if (node.escapedText === "await") {
|
|
19996
20019
|
node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
|
|
19997
20020
|
}
|
|
19998
|
-
if (node.
|
|
20021
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
19999
20022
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
20000
20023
|
}
|
|
20001
20024
|
return node;
|
|
20002
20025
|
}
|
|
20003
|
-
function updateIdentifier(node, typeArguments) {
|
|
20004
|
-
return node.typeArguments !== typeArguments ? update(createIdentifier3(idText(node), typeArguments), node) : node;
|
|
20005
|
-
}
|
|
20006
20026
|
function createTempVariable3(recordTempVariable, reservedInNestedScopes, prefix, suffix) {
|
|
20007
20027
|
let flags2 = 1 /* Auto */;
|
|
20008
20028
|
if (reservedInNestedScopes)
|
|
@@ -20050,7 +20070,6 @@ ${lanes.join("\n")}
|
|
|
20050
20070
|
function createBasePrivateIdentifier(escapedText) {
|
|
20051
20071
|
const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
|
|
20052
20072
|
node.escapedText = escapedText;
|
|
20053
|
-
node.autoGenerate = void 0;
|
|
20054
20073
|
node.transformFlags |= 16777216 /* ContainsClassFields */;
|
|
20055
20074
|
return node;
|
|
20056
20075
|
}
|
|
@@ -20061,12 +20080,12 @@ ${lanes.join("\n")}
|
|
|
20061
20080
|
}
|
|
20062
20081
|
function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
20063
20082
|
const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
|
|
20064
|
-
node
|
|
20083
|
+
setIdentifierAutoGenerate(node, {
|
|
20065
20084
|
flags: autoGenerateFlags,
|
|
20066
20085
|
id: nextAutoGenerateId,
|
|
20067
20086
|
prefix,
|
|
20068
20087
|
suffix
|
|
20069
|
-
};
|
|
20088
|
+
});
|
|
20070
20089
|
nextAutoGenerateId++;
|
|
20071
20090
|
return node;
|
|
20072
20091
|
}
|
|
@@ -20228,7 +20247,6 @@ ${lanes.join("\n")}
|
|
|
20228
20247
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20229
20248
|
node.expression = void 0;
|
|
20230
20249
|
node.jsDoc = void 0;
|
|
20231
|
-
node.jsDocCache = void 0;
|
|
20232
20250
|
return node;
|
|
20233
20251
|
}
|
|
20234
20252
|
function updateTypeParameterDeclaration2(node, modifiers, name, constraint, defaultType) {
|
|
@@ -20249,7 +20267,6 @@ ${lanes.join("\n")}
|
|
|
20249
20267
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (((_a2 = node.questionToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */) | (((_b = node.dotDotDotToken) != null ? _b : node.initializer) ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
|
|
20250
20268
|
}
|
|
20251
20269
|
node.jsDoc = void 0;
|
|
20252
|
-
node.jsDocCache = void 0;
|
|
20253
20270
|
return node;
|
|
20254
20271
|
}
|
|
20255
20272
|
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
@@ -20277,7 +20294,6 @@ ${lanes.join("\n")}
|
|
|
20277
20294
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20278
20295
|
node.initializer = void 0;
|
|
20279
20296
|
node.jsDoc = void 0;
|
|
20280
|
-
node.jsDocCache = void 0;
|
|
20281
20297
|
return node;
|
|
20282
20298
|
}
|
|
20283
20299
|
function updatePropertySignature3(node, modifiers, name, questionToken, type) {
|
|
@@ -20300,7 +20316,6 @@ ${lanes.join("\n")}
|
|
|
20300
20316
|
const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */;
|
|
20301
20317
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
|
|
20302
20318
|
node.jsDoc = void 0;
|
|
20303
|
-
node.jsDocCache = void 0;
|
|
20304
20319
|
return node;
|
|
20305
20320
|
}
|
|
20306
20321
|
function updatePropertyDeclaration2(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
@@ -20316,7 +20331,6 @@ ${lanes.join("\n")}
|
|
|
20316
20331
|
node.type = type;
|
|
20317
20332
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20318
20333
|
node.jsDoc = void 0;
|
|
20319
|
-
node.jsDocCache = void 0;
|
|
20320
20334
|
node.locals = void 0;
|
|
20321
20335
|
node.nextContainer = void 0;
|
|
20322
20336
|
node.typeArguments = void 0;
|
|
@@ -20346,7 +20360,6 @@ ${lanes.join("\n")}
|
|
|
20346
20360
|
}
|
|
20347
20361
|
node.typeArguments = void 0;
|
|
20348
20362
|
node.jsDoc = void 0;
|
|
20349
|
-
node.jsDocCache = void 0;
|
|
20350
20363
|
node.locals = void 0;
|
|
20351
20364
|
node.nextContainer = void 0;
|
|
20352
20365
|
node.flowNode = void 0;
|
|
@@ -20370,7 +20383,6 @@ ${lanes.join("\n")}
|
|
|
20370
20383
|
node.illegalDecorators = void 0;
|
|
20371
20384
|
node.modifiers = void 0;
|
|
20372
20385
|
node.jsDoc = void 0;
|
|
20373
|
-
node.jsDocCache = void 0;
|
|
20374
20386
|
node.locals = void 0;
|
|
20375
20387
|
node.nextContainer = void 0;
|
|
20376
20388
|
node.endFlowNode = void 0;
|
|
@@ -20398,7 +20410,6 @@ ${lanes.join("\n")}
|
|
|
20398
20410
|
node.type = void 0;
|
|
20399
20411
|
node.typeArguments = void 0;
|
|
20400
20412
|
node.jsDoc = void 0;
|
|
20401
|
-
node.jsDocCache = void 0;
|
|
20402
20413
|
node.locals = void 0;
|
|
20403
20414
|
node.nextContainer = void 0;
|
|
20404
20415
|
node.endFlowNode = void 0;
|
|
@@ -20431,7 +20442,6 @@ ${lanes.join("\n")}
|
|
|
20431
20442
|
node.typeArguments = void 0;
|
|
20432
20443
|
node.typeParameters = void 0;
|
|
20433
20444
|
node.jsDoc = void 0;
|
|
20434
|
-
node.jsDocCache = void 0;
|
|
20435
20445
|
node.locals = void 0;
|
|
20436
20446
|
node.nextContainer = void 0;
|
|
20437
20447
|
node.flowNode = void 0;
|
|
@@ -20463,7 +20473,6 @@ ${lanes.join("\n")}
|
|
|
20463
20473
|
node.typeParameters = void 0;
|
|
20464
20474
|
node.type = void 0;
|
|
20465
20475
|
node.jsDoc = void 0;
|
|
20466
|
-
node.jsDocCache = void 0;
|
|
20467
20476
|
node.locals = void 0;
|
|
20468
20477
|
node.nextContainer = void 0;
|
|
20469
20478
|
node.flowNode = void 0;
|
|
@@ -20488,7 +20497,6 @@ ${lanes.join("\n")}
|
|
|
20488
20497
|
node.type = type;
|
|
20489
20498
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20490
20499
|
node.jsDoc = void 0;
|
|
20491
|
-
node.jsDocCache = void 0;
|
|
20492
20500
|
node.locals = void 0;
|
|
20493
20501
|
node.nextContainer = void 0;
|
|
20494
20502
|
node.typeArguments = void 0;
|
|
@@ -20504,7 +20512,6 @@ ${lanes.join("\n")}
|
|
|
20504
20512
|
node.type = type;
|
|
20505
20513
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20506
20514
|
node.jsDoc = void 0;
|
|
20507
|
-
node.jsDocCache = void 0;
|
|
20508
20515
|
node.locals = void 0;
|
|
20509
20516
|
node.nextContainer = void 0;
|
|
20510
20517
|
node.typeArguments = void 0;
|
|
@@ -20521,7 +20528,6 @@ ${lanes.join("\n")}
|
|
|
20521
20528
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20522
20529
|
node.illegalDecorators = void 0;
|
|
20523
20530
|
node.jsDoc = void 0;
|
|
20524
|
-
node.jsDocCache = void 0;
|
|
20525
20531
|
node.locals = void 0;
|
|
20526
20532
|
node.nextContainer = void 0;
|
|
20527
20533
|
node.typeArguments = void 0;
|
|
@@ -20572,7 +20578,6 @@ ${lanes.join("\n")}
|
|
|
20572
20578
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20573
20579
|
node.modifiers = void 0;
|
|
20574
20580
|
node.jsDoc = void 0;
|
|
20575
|
-
node.jsDocCache = void 0;
|
|
20576
20581
|
node.locals = void 0;
|
|
20577
20582
|
node.nextContainer = void 0;
|
|
20578
20583
|
node.typeArguments = void 0;
|
|
@@ -20598,7 +20603,6 @@ ${lanes.join("\n")}
|
|
|
20598
20603
|
node.type = type;
|
|
20599
20604
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20600
20605
|
node.jsDoc = void 0;
|
|
20601
|
-
node.jsDocCache = void 0;
|
|
20602
20606
|
node.locals = void 0;
|
|
20603
20607
|
node.nextContainer = void 0;
|
|
20604
20608
|
node.typeArguments = void 0;
|
|
@@ -20667,7 +20671,6 @@ ${lanes.join("\n")}
|
|
|
20667
20671
|
node.type = type;
|
|
20668
20672
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
20669
20673
|
node.jsDoc = void 0;
|
|
20670
|
-
node.jsDocCache = void 0;
|
|
20671
20674
|
return node;
|
|
20672
20675
|
}
|
|
20673
20676
|
function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
|
|
@@ -20869,7 +20872,6 @@ ${lanes.join("\n")}
|
|
|
20869
20872
|
node.multiLine = multiLine;
|
|
20870
20873
|
node.transformFlags |= propagateChildrenFlags(node.properties);
|
|
20871
20874
|
node.jsDoc = void 0;
|
|
20872
|
-
node.jsDocCache = void 0;
|
|
20873
20875
|
return node;
|
|
20874
20876
|
}
|
|
20875
20877
|
function updateObjectLiteralExpression(node, properties) {
|
|
@@ -20882,7 +20884,6 @@ ${lanes.join("\n")}
|
|
|
20882
20884
|
node.name = name;
|
|
20883
20885
|
node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
20884
20886
|
node.jsDoc = void 0;
|
|
20885
|
-
node.jsDocCache = void 0;
|
|
20886
20887
|
node.flowNode = void 0;
|
|
20887
20888
|
return node;
|
|
20888
20889
|
}
|
|
@@ -20933,7 +20934,6 @@ ${lanes.join("\n")}
|
|
|
20933
20934
|
node.argumentExpression = argumentExpression;
|
|
20934
20935
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);
|
|
20935
20936
|
node.jsDoc = void 0;
|
|
20936
|
-
node.jsDocCache = void 0;
|
|
20937
20937
|
node.flowNode = void 0;
|
|
20938
20938
|
return node;
|
|
20939
20939
|
}
|
|
@@ -21084,7 +21084,6 @@ ${lanes.join("\n")}
|
|
|
21084
21084
|
node.expression = expression;
|
|
21085
21085
|
node.transformFlags = propagateChildFlags(node.expression);
|
|
21086
21086
|
node.jsDoc = void 0;
|
|
21087
|
-
node.jsDocCache = void 0;
|
|
21088
21087
|
return node;
|
|
21089
21088
|
}
|
|
21090
21089
|
function updateParenthesizedExpression(node, expression) {
|
|
@@ -21105,7 +21104,6 @@ ${lanes.join("\n")}
|
|
|
21105
21104
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
21106
21105
|
node.typeArguments = void 0;
|
|
21107
21106
|
node.jsDoc = void 0;
|
|
21108
|
-
node.jsDocCache = void 0;
|
|
21109
21107
|
node.locals = void 0;
|
|
21110
21108
|
node.nextContainer = void 0;
|
|
21111
21109
|
node.flowNode = void 0;
|
|
@@ -21128,7 +21126,6 @@ ${lanes.join("\n")}
|
|
|
21128
21126
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
21129
21127
|
node.typeArguments = void 0;
|
|
21130
21128
|
node.jsDoc = void 0;
|
|
21131
|
-
node.jsDocCache = void 0;
|
|
21132
21129
|
node.locals = void 0;
|
|
21133
21130
|
node.nextContainer = void 0;
|
|
21134
21131
|
node.flowNode = void 0;
|
|
@@ -21226,7 +21223,6 @@ ${lanes.join("\n")}
|
|
|
21226
21223
|
node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;
|
|
21227
21224
|
}
|
|
21228
21225
|
node.jsDoc = void 0;
|
|
21229
|
-
node.jsDocCache = void 0;
|
|
21230
21226
|
return node;
|
|
21231
21227
|
}
|
|
21232
21228
|
function propagateAssignmentPatternFlags(node) {
|
|
@@ -21368,7 +21364,6 @@ ${lanes.join("\n")}
|
|
|
21368
21364
|
node.members = createNodeArray2(members);
|
|
21369
21365
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
21370
21366
|
node.jsDoc = void 0;
|
|
21371
|
-
node.jsDocCache = void 0;
|
|
21372
21367
|
return node;
|
|
21373
21368
|
}
|
|
21374
21369
|
function updateClassExpression3(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -21484,7 +21479,6 @@ ${lanes.join("\n")}
|
|
|
21484
21479
|
node.multiLine = multiLine;
|
|
21485
21480
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
21486
21481
|
node.jsDoc = void 0;
|
|
21487
|
-
node.jsDocCache = void 0;
|
|
21488
21482
|
node.locals = void 0;
|
|
21489
21483
|
node.nextContainer = void 0;
|
|
21490
21484
|
return node;
|
|
@@ -21502,7 +21496,6 @@ ${lanes.join("\n")}
|
|
|
21502
21496
|
}
|
|
21503
21497
|
node.illegalDecorators = void 0;
|
|
21504
21498
|
node.jsDoc = void 0;
|
|
21505
|
-
node.jsDocCache = void 0;
|
|
21506
21499
|
node.flowNode = void 0;
|
|
21507
21500
|
return node;
|
|
21508
21501
|
}
|
|
@@ -21512,7 +21505,6 @@ ${lanes.join("\n")}
|
|
|
21512
21505
|
function createEmptyStatement2() {
|
|
21513
21506
|
const node = createBaseNode(239 /* EmptyStatement */);
|
|
21514
21507
|
node.jsDoc = void 0;
|
|
21515
|
-
node.jsDocCache = void 0;
|
|
21516
21508
|
return node;
|
|
21517
21509
|
}
|
|
21518
21510
|
function createExpressionStatement2(expression) {
|
|
@@ -21520,7 +21512,6 @@ ${lanes.join("\n")}
|
|
|
21520
21512
|
node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
|
|
21521
21513
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
21522
21514
|
node.jsDoc = void 0;
|
|
21523
|
-
node.jsDocCache = void 0;
|
|
21524
21515
|
node.flowNode = void 0;
|
|
21525
21516
|
return node;
|
|
21526
21517
|
}
|
|
@@ -21534,7 +21525,6 @@ ${lanes.join("\n")}
|
|
|
21534
21525
|
node.elseStatement = asEmbeddedStatement(elseStatement);
|
|
21535
21526
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);
|
|
21536
21527
|
node.jsDoc = void 0;
|
|
21537
|
-
node.jsDocCache = void 0;
|
|
21538
21528
|
node.flowNode = void 0;
|
|
21539
21529
|
return node;
|
|
21540
21530
|
}
|
|
@@ -21547,7 +21537,6 @@ ${lanes.join("\n")}
|
|
|
21547
21537
|
node.expression = expression;
|
|
21548
21538
|
node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);
|
|
21549
21539
|
node.jsDoc = void 0;
|
|
21550
|
-
node.jsDocCache = void 0;
|
|
21551
21540
|
node.flowNode = void 0;
|
|
21552
21541
|
return node;
|
|
21553
21542
|
}
|
|
@@ -21560,7 +21549,6 @@ ${lanes.join("\n")}
|
|
|
21560
21549
|
node.statement = asEmbeddedStatement(statement);
|
|
21561
21550
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
21562
21551
|
node.jsDoc = void 0;
|
|
21563
|
-
node.jsDocCache = void 0;
|
|
21564
21552
|
node.flowNode = void 0;
|
|
21565
21553
|
return node;
|
|
21566
21554
|
}
|
|
@@ -21575,7 +21563,6 @@ ${lanes.join("\n")}
|
|
|
21575
21563
|
node.statement = asEmbeddedStatement(statement);
|
|
21576
21564
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);
|
|
21577
21565
|
node.jsDoc = void 0;
|
|
21578
|
-
node.jsDocCache = void 0;
|
|
21579
21566
|
node.locals = void 0;
|
|
21580
21567
|
node.nextContainer = void 0;
|
|
21581
21568
|
node.flowNode = void 0;
|
|
@@ -21591,7 +21578,6 @@ ${lanes.join("\n")}
|
|
|
21591
21578
|
node.statement = asEmbeddedStatement(statement);
|
|
21592
21579
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
21593
21580
|
node.jsDoc = void 0;
|
|
21594
|
-
node.jsDocCache = void 0;
|
|
21595
21581
|
node.locals = void 0;
|
|
21596
21582
|
node.nextContainer = void 0;
|
|
21597
21583
|
node.flowNode = void 0;
|
|
@@ -21610,7 +21596,6 @@ ${lanes.join("\n")}
|
|
|
21610
21596
|
if (awaitModifier)
|
|
21611
21597
|
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
21612
21598
|
node.jsDoc = void 0;
|
|
21613
|
-
node.jsDocCache = void 0;
|
|
21614
21599
|
node.locals = void 0;
|
|
21615
21600
|
node.nextContainer = void 0;
|
|
21616
21601
|
node.flowNode = void 0;
|
|
@@ -21624,7 +21609,6 @@ ${lanes.join("\n")}
|
|
|
21624
21609
|
node.label = asName(label);
|
|
21625
21610
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
21626
21611
|
node.jsDoc = void 0;
|
|
21627
|
-
node.jsDocCache = void 0;
|
|
21628
21612
|
node.flowNode = void 0;
|
|
21629
21613
|
return node;
|
|
21630
21614
|
}
|
|
@@ -21636,7 +21620,6 @@ ${lanes.join("\n")}
|
|
|
21636
21620
|
node.label = asName(label);
|
|
21637
21621
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
21638
21622
|
node.jsDoc = void 0;
|
|
21639
|
-
node.jsDocCache = void 0;
|
|
21640
21623
|
node.flowNode = void 0;
|
|
21641
21624
|
return node;
|
|
21642
21625
|
}
|
|
@@ -21648,7 +21631,6 @@ ${lanes.join("\n")}
|
|
|
21648
21631
|
node.expression = expression;
|
|
21649
21632
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
21650
21633
|
node.jsDoc = void 0;
|
|
21651
|
-
node.jsDocCache = void 0;
|
|
21652
21634
|
node.flowNode = void 0;
|
|
21653
21635
|
return node;
|
|
21654
21636
|
}
|
|
@@ -21661,7 +21643,6 @@ ${lanes.join("\n")}
|
|
|
21661
21643
|
node.statement = asEmbeddedStatement(statement);
|
|
21662
21644
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
21663
21645
|
node.jsDoc = void 0;
|
|
21664
|
-
node.jsDocCache = void 0;
|
|
21665
21646
|
node.flowNode = void 0;
|
|
21666
21647
|
return node;
|
|
21667
21648
|
}
|
|
@@ -21674,7 +21655,6 @@ ${lanes.join("\n")}
|
|
|
21674
21655
|
node.caseBlock = caseBlock;
|
|
21675
21656
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);
|
|
21676
21657
|
node.jsDoc = void 0;
|
|
21677
|
-
node.jsDocCache = void 0;
|
|
21678
21658
|
node.flowNode = void 0;
|
|
21679
21659
|
node.possiblyExhaustive = false;
|
|
21680
21660
|
return node;
|
|
@@ -21688,7 +21668,6 @@ ${lanes.join("\n")}
|
|
|
21688
21668
|
node.statement = asEmbeddedStatement(statement);
|
|
21689
21669
|
node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);
|
|
21690
21670
|
node.jsDoc = void 0;
|
|
21691
|
-
node.jsDocCache = void 0;
|
|
21692
21671
|
node.flowNode = void 0;
|
|
21693
21672
|
return node;
|
|
21694
21673
|
}
|
|
@@ -21700,7 +21679,6 @@ ${lanes.join("\n")}
|
|
|
21700
21679
|
node.expression = expression;
|
|
21701
21680
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
21702
21681
|
node.jsDoc = void 0;
|
|
21703
|
-
node.jsDocCache = void 0;
|
|
21704
21682
|
node.flowNode = void 0;
|
|
21705
21683
|
return node;
|
|
21706
21684
|
}
|
|
@@ -21714,7 +21692,6 @@ ${lanes.join("\n")}
|
|
|
21714
21692
|
node.finallyBlock = finallyBlock;
|
|
21715
21693
|
node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);
|
|
21716
21694
|
node.jsDoc = void 0;
|
|
21717
|
-
node.jsDocCache = void 0;
|
|
21718
21695
|
node.flowNode = void 0;
|
|
21719
21696
|
return node;
|
|
21720
21697
|
}
|
|
@@ -21724,7 +21701,6 @@ ${lanes.join("\n")}
|
|
|
21724
21701
|
function createDebuggerStatement2() {
|
|
21725
21702
|
const node = createBaseNode(256 /* DebuggerStatement */);
|
|
21726
21703
|
node.jsDoc = void 0;
|
|
21727
|
-
node.jsDocCache = void 0;
|
|
21728
21704
|
node.flowNode = void 0;
|
|
21729
21705
|
return node;
|
|
21730
21706
|
}
|
|
@@ -21737,7 +21713,6 @@ ${lanes.join("\n")}
|
|
|
21737
21713
|
node.initializer = asInitializer(initializer);
|
|
21738
21714
|
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (((_a2 = node.exclamationToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
21739
21715
|
node.jsDoc = void 0;
|
|
21740
|
-
node.jsDocCache = void 0;
|
|
21741
21716
|
return node;
|
|
21742
21717
|
}
|
|
21743
21718
|
function updateVariableDeclaration3(node, name, exclamationToken, type, initializer) {
|
|
@@ -21776,7 +21751,6 @@ ${lanes.join("\n")}
|
|
|
21776
21751
|
node.illegalDecorators = void 0;
|
|
21777
21752
|
node.typeArguments = void 0;
|
|
21778
21753
|
node.jsDoc = void 0;
|
|
21779
|
-
node.jsDocCache = void 0;
|
|
21780
21754
|
node.locals = void 0;
|
|
21781
21755
|
node.nextContainer = void 0;
|
|
21782
21756
|
node.endFlowNode = void 0;
|
|
@@ -21808,7 +21782,6 @@ ${lanes.join("\n")}
|
|
|
21808
21782
|
}
|
|
21809
21783
|
}
|
|
21810
21784
|
node.jsDoc = void 0;
|
|
21811
|
-
node.jsDocCache = void 0;
|
|
21812
21785
|
return node;
|
|
21813
21786
|
}
|
|
21814
21787
|
function updateClassDeclaration2(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -21824,7 +21797,6 @@ ${lanes.join("\n")}
|
|
|
21824
21797
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
21825
21798
|
node.illegalDecorators = void 0;
|
|
21826
21799
|
node.jsDoc = void 0;
|
|
21827
|
-
node.jsDocCache = void 0;
|
|
21828
21800
|
return node;
|
|
21829
21801
|
}
|
|
21830
21802
|
function updateInterfaceDeclaration2(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -21845,7 +21817,6 @@ ${lanes.join("\n")}
|
|
|
21845
21817
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
21846
21818
|
node.illegalDecorators = void 0;
|
|
21847
21819
|
node.jsDoc = void 0;
|
|
21848
|
-
node.jsDocCache = void 0;
|
|
21849
21820
|
node.locals = void 0;
|
|
21850
21821
|
node.nextContainer = void 0;
|
|
21851
21822
|
return node;
|
|
@@ -21868,7 +21839,6 @@ ${lanes.join("\n")}
|
|
|
21868
21839
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
21869
21840
|
node.illegalDecorators = void 0;
|
|
21870
21841
|
node.jsDoc = void 0;
|
|
21871
|
-
node.jsDocCache = void 0;
|
|
21872
21842
|
return node;
|
|
21873
21843
|
}
|
|
21874
21844
|
function updateEnumDeclaration2(node, modifiers, name, members) {
|
|
@@ -21894,7 +21864,6 @@ ${lanes.join("\n")}
|
|
|
21894
21864
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
21895
21865
|
node.illegalDecorators = void 0;
|
|
21896
21866
|
node.jsDoc = void 0;
|
|
21897
|
-
node.jsDocCache = void 0;
|
|
21898
21867
|
node.locals = void 0;
|
|
21899
21868
|
node.nextContainer = void 0;
|
|
21900
21869
|
return node;
|
|
@@ -21913,7 +21882,6 @@ ${lanes.join("\n")}
|
|
|
21913
21882
|
node.statements = createNodeArray2(statements);
|
|
21914
21883
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
21915
21884
|
node.jsDoc = void 0;
|
|
21916
|
-
node.jsDocCache = void 0;
|
|
21917
21885
|
return node;
|
|
21918
21886
|
}
|
|
21919
21887
|
function updateModuleBlock2(node, statements) {
|
|
@@ -21937,7 +21905,6 @@ ${lanes.join("\n")}
|
|
|
21937
21905
|
node.illegalDecorators = void 0;
|
|
21938
21906
|
node.modifiers = void 0;
|
|
21939
21907
|
node.jsDoc = void 0;
|
|
21940
|
-
node.jsDocCache = void 0;
|
|
21941
21908
|
return node;
|
|
21942
21909
|
}
|
|
21943
21910
|
function updateNamespaceExportDeclaration2(node, name) {
|
|
@@ -21963,7 +21930,6 @@ ${lanes.join("\n")}
|
|
|
21963
21930
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
21964
21931
|
node.illegalDecorators = void 0;
|
|
21965
21932
|
node.jsDoc = void 0;
|
|
21966
|
-
node.jsDocCache = void 0;
|
|
21967
21933
|
return node;
|
|
21968
21934
|
}
|
|
21969
21935
|
function updateImportEqualsDeclaration2(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
@@ -21985,7 +21951,6 @@ ${lanes.join("\n")}
|
|
|
21985
21951
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
21986
21952
|
node.illegalDecorators = void 0;
|
|
21987
21953
|
node.jsDoc = void 0;
|
|
21988
|
-
node.jsDocCache = void 0;
|
|
21989
21954
|
return node;
|
|
21990
21955
|
}
|
|
21991
21956
|
function updateImportDeclaration2(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
@@ -22097,7 +22062,6 @@ ${lanes.join("\n")}
|
|
|
22097
22062
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22098
22063
|
node.illegalDecorators = void 0;
|
|
22099
22064
|
node.jsDoc = void 0;
|
|
22100
|
-
node.jsDocCache = void 0;
|
|
22101
22065
|
return node;
|
|
22102
22066
|
}
|
|
22103
22067
|
function updateExportAssignment2(node, modifiers, expression) {
|
|
@@ -22120,7 +22084,6 @@ ${lanes.join("\n")}
|
|
|
22120
22084
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22121
22085
|
node.illegalDecorators = void 0;
|
|
22122
22086
|
node.jsDoc = void 0;
|
|
22123
|
-
node.jsDocCache = void 0;
|
|
22124
22087
|
return node;
|
|
22125
22088
|
}
|
|
22126
22089
|
function updateExportDeclaration3(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
@@ -22150,7 +22113,6 @@ ${lanes.join("\n")}
|
|
|
22150
22113
|
node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);
|
|
22151
22114
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
22152
22115
|
node.jsDoc = void 0;
|
|
22153
|
-
node.jsDocCache = void 0;
|
|
22154
22116
|
return node;
|
|
22155
22117
|
}
|
|
22156
22118
|
function updateExportSpecifier2(node, isTypeOnly, propertyName, name) {
|
|
@@ -22159,7 +22121,6 @@ ${lanes.join("\n")}
|
|
|
22159
22121
|
function createMissingDeclaration() {
|
|
22160
22122
|
const node = createBaseDeclaration(279 /* MissingDeclaration */);
|
|
22161
22123
|
node.jsDoc = void 0;
|
|
22162
|
-
node.jsDocCache = void 0;
|
|
22163
22124
|
return node;
|
|
22164
22125
|
}
|
|
22165
22126
|
function createExternalModuleReference2(expression) {
|
|
@@ -22200,7 +22161,6 @@ ${lanes.join("\n")}
|
|
|
22200
22161
|
node.type = type;
|
|
22201
22162
|
node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
22202
22163
|
node.jsDoc = void 0;
|
|
22203
|
-
node.jsDocCache = void 0;
|
|
22204
22164
|
node.locals = void 0;
|
|
22205
22165
|
node.nextContainer = void 0;
|
|
22206
22166
|
node.typeArguments = void 0;
|
|
@@ -22232,7 +22192,6 @@ ${lanes.join("\n")}
|
|
|
22232
22192
|
node.parameters = createNodeArray2(parameters);
|
|
22233
22193
|
node.type = type;
|
|
22234
22194
|
node.jsDoc = void 0;
|
|
22235
|
-
node.jsDocCache = void 0;
|
|
22236
22195
|
node.locals = void 0;
|
|
22237
22196
|
node.nextContainer = void 0;
|
|
22238
22197
|
return node;
|
|
@@ -22560,7 +22519,6 @@ ${lanes.join("\n")}
|
|
|
22560
22519
|
node.statements = createNodeArray2(statements);
|
|
22561
22520
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);
|
|
22562
22521
|
node.jsDoc = void 0;
|
|
22563
|
-
node.jsDocCache = void 0;
|
|
22564
22522
|
return node;
|
|
22565
22523
|
}
|
|
22566
22524
|
function updateCaseClause2(node, expression, statements) {
|
|
@@ -22617,7 +22575,6 @@ ${lanes.join("\n")}
|
|
|
22617
22575
|
node.questionToken = void 0;
|
|
22618
22576
|
node.exclamationToken = void 0;
|
|
22619
22577
|
node.jsDoc = void 0;
|
|
22620
|
-
node.jsDocCache = void 0;
|
|
22621
22578
|
return node;
|
|
22622
22579
|
}
|
|
22623
22580
|
function updatePropertyAssignment2(node, name, initializer) {
|
|
@@ -22643,7 +22600,6 @@ ${lanes.join("\n")}
|
|
|
22643
22600
|
node.questionToken = void 0;
|
|
22644
22601
|
node.exclamationToken = void 0;
|
|
22645
22602
|
node.jsDoc = void 0;
|
|
22646
|
-
node.jsDocCache = void 0;
|
|
22647
22603
|
return node;
|
|
22648
22604
|
}
|
|
22649
22605
|
function updateShorthandPropertyAssignment2(node, name, objectAssignmentInitializer) {
|
|
@@ -22664,7 +22620,6 @@ ${lanes.join("\n")}
|
|
|
22664
22620
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
22665
22621
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;
|
|
22666
22622
|
node.jsDoc = void 0;
|
|
22667
|
-
node.jsDocCache = void 0;
|
|
22668
22623
|
return node;
|
|
22669
22624
|
}
|
|
22670
22625
|
function updateSpreadAssignment2(node, expression) {
|
|
@@ -22676,7 +22631,6 @@ ${lanes.join("\n")}
|
|
|
22676
22631
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
22677
22632
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;
|
|
22678
22633
|
node.jsDoc = void 0;
|
|
22679
|
-
node.jsDocCache = void 0;
|
|
22680
22634
|
return node;
|
|
22681
22635
|
}
|
|
22682
22636
|
function updateEnumMember2(node, name, initializer) {
|
|
@@ -22922,36 +22876,32 @@ ${lanes.join("\n")}
|
|
|
22922
22876
|
return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;
|
|
22923
22877
|
}
|
|
22924
22878
|
function cloneGeneratedIdentifier(node) {
|
|
22925
|
-
const clone2 = createBaseIdentifier(
|
|
22926
|
-
node.escapedText,
|
|
22927
|
-
/*originalKeywordKind*/
|
|
22928
|
-
void 0
|
|
22929
|
-
);
|
|
22879
|
+
const clone2 = createBaseIdentifier(node.escapedText);
|
|
22930
22880
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
22931
|
-
clone2.autoGenerate = { ...node.autoGenerate };
|
|
22932
22881
|
clone2.transformFlags = node.transformFlags;
|
|
22933
22882
|
setOriginalNode(clone2, node);
|
|
22883
|
+
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
22934
22884
|
return clone2;
|
|
22935
22885
|
}
|
|
22936
22886
|
function cloneIdentifier(node) {
|
|
22937
|
-
const clone2 = createBaseIdentifier(node.escapedText
|
|
22887
|
+
const clone2 = createBaseIdentifier(node.escapedText);
|
|
22938
22888
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
22939
|
-
clone2.typeArguments = node.typeArguments;
|
|
22940
|
-
clone2.hasExtendedUnicodeEscape = node.hasExtendedUnicodeEscape;
|
|
22941
22889
|
clone2.jsDoc = node.jsDoc;
|
|
22942
|
-
clone2.jsDocCache = node.jsDocCache;
|
|
22943
22890
|
clone2.flowNode = node.flowNode;
|
|
22944
22891
|
clone2.symbol = node.symbol;
|
|
22945
22892
|
clone2.transformFlags = node.transformFlags;
|
|
22946
22893
|
setOriginalNode(clone2, node);
|
|
22894
|
+
const typeArguments = getIdentifierTypeArguments(node);
|
|
22895
|
+
if (typeArguments)
|
|
22896
|
+
setIdentifierTypeArguments(clone2, typeArguments);
|
|
22947
22897
|
return clone2;
|
|
22948
22898
|
}
|
|
22949
22899
|
function cloneGeneratedPrivateIdentifier(node) {
|
|
22950
22900
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
22951
22901
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
22952
|
-
clone2.autoGenerate = { ...node.autoGenerate };
|
|
22953
22902
|
clone2.transformFlags = node.transformFlags;
|
|
22954
22903
|
setOriginalNode(clone2, node);
|
|
22904
|
+
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
22955
22905
|
return clone2;
|
|
22956
22906
|
}
|
|
22957
22907
|
function clonePrivateIdentifier(node) {
|
|
@@ -24220,6 +24170,30 @@ ${lanes.join("\n")}
|
|
|
24220
24170
|
var _a2;
|
|
24221
24171
|
return (_a2 = node.emitNode) == null ? void 0 : _a2.typeNode;
|
|
24222
24172
|
}
|
|
24173
|
+
function setIdentifierTypeArguments(node, typeArguments) {
|
|
24174
|
+
getOrCreateEmitNode(node).identifierTypeArguments = typeArguments;
|
|
24175
|
+
return node;
|
|
24176
|
+
}
|
|
24177
|
+
function getIdentifierTypeArguments(node) {
|
|
24178
|
+
var _a2;
|
|
24179
|
+
return (_a2 = node.emitNode) == null ? void 0 : _a2.identifierTypeArguments;
|
|
24180
|
+
}
|
|
24181
|
+
function setIdentifierAutoGenerate(node, autoGenerate) {
|
|
24182
|
+
getOrCreateEmitNode(node).autoGenerate = autoGenerate;
|
|
24183
|
+
return node;
|
|
24184
|
+
}
|
|
24185
|
+
function getIdentifierAutoGenerate(node) {
|
|
24186
|
+
var _a2;
|
|
24187
|
+
return (_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate;
|
|
24188
|
+
}
|
|
24189
|
+
function setIdentifierGeneratedImportReference(node, value) {
|
|
24190
|
+
getOrCreateEmitNode(node).generatedImportReference = value;
|
|
24191
|
+
return node;
|
|
24192
|
+
}
|
|
24193
|
+
function getIdentifierGeneratedImportReference(node) {
|
|
24194
|
+
var _a2;
|
|
24195
|
+
return (_a2 = node.emitNode) == null ? void 0 : _a2.generatedImportReference;
|
|
24196
|
+
}
|
|
24223
24197
|
var init_emitNode = __esm({
|
|
24224
24198
|
"src/compiler/factory/emitNode.ts"() {
|
|
24225
24199
|
"use strict";
|
|
@@ -26468,13 +26442,16 @@ ${lanes.join("\n")}
|
|
|
26468
26442
|
return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);
|
|
26469
26443
|
}
|
|
26470
26444
|
function getNodeForGeneratedName(name) {
|
|
26471
|
-
|
|
26472
|
-
|
|
26445
|
+
var _a2;
|
|
26446
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
26447
|
+
if (autoGenerate.flags & 4 /* Node */) {
|
|
26448
|
+
const autoGenerateId = autoGenerate.id;
|
|
26473
26449
|
let node = name;
|
|
26474
26450
|
let original = node.original;
|
|
26475
26451
|
while (original) {
|
|
26476
26452
|
node = original;
|
|
26477
|
-
|
|
26453
|
+
const autoGenerate2 = (_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate;
|
|
26454
|
+
if (isMemberName(node) && (autoGenerate2 === void 0 || !!(autoGenerate2.flags & 4 /* Node */) && autoGenerate2.id !== autoGenerateId)) {
|
|
26478
26455
|
break;
|
|
26479
26456
|
}
|
|
26480
26457
|
original = node.original;
|
|
@@ -28428,8 +28405,6 @@ ${lanes.join("\n")}
|
|
|
28428
28405
|
const pos = getNodePos();
|
|
28429
28406
|
const result = kind === 79 /* Identifier */ ? factory2.createIdentifier(
|
|
28430
28407
|
"",
|
|
28431
|
-
/*typeArguments*/
|
|
28432
|
-
void 0,
|
|
28433
28408
|
/*originalKeywordKind*/
|
|
28434
28409
|
void 0
|
|
28435
28410
|
) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(
|
|
@@ -28464,13 +28439,7 @@ ${lanes.join("\n")}
|
|
|
28464
28439
|
const text = internIdentifier(scanner2.getTokenValue());
|
|
28465
28440
|
const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape();
|
|
28466
28441
|
nextTokenWithoutCheck();
|
|
28467
|
-
return finishNode(factory2.createIdentifier(
|
|
28468
|
-
text,
|
|
28469
|
-
/*typeArguments*/
|
|
28470
|
-
void 0,
|
|
28471
|
-
originalKeywordKind,
|
|
28472
|
-
hasExtendedUnicodeEscape
|
|
28473
|
-
), pos);
|
|
28442
|
+
return finishNode(factory2.createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos);
|
|
28474
28443
|
}
|
|
28475
28444
|
if (token() === 80 /* PrivateIdentifier */) {
|
|
28476
28445
|
parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
|
|
@@ -28812,6 +28781,7 @@ ${lanes.join("\n")}
|
|
|
28812
28781
|
return parseElement();
|
|
28813
28782
|
}
|
|
28814
28783
|
function currentNode(parsingContext2, pos) {
|
|
28784
|
+
var _a2;
|
|
28815
28785
|
if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) {
|
|
28816
28786
|
return void 0;
|
|
28817
28787
|
}
|
|
@@ -28826,8 +28796,8 @@ ${lanes.join("\n")}
|
|
|
28826
28796
|
if (!canReuseNode(node, parsingContext2)) {
|
|
28827
28797
|
return void 0;
|
|
28828
28798
|
}
|
|
28829
|
-
if (canHaveJSDoc(node) && node.jsDocCache) {
|
|
28830
|
-
node.jsDocCache = void 0;
|
|
28799
|
+
if (canHaveJSDoc(node) && ((_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache)) {
|
|
28800
|
+
node.jsDoc.jsDocCache = void 0;
|
|
28831
28801
|
}
|
|
28832
28802
|
return node;
|
|
28833
28803
|
}
|
|
@@ -28886,7 +28856,7 @@ ${lanes.join("\n")}
|
|
|
28886
28856
|
return true;
|
|
28887
28857
|
case 171 /* MethodDeclaration */:
|
|
28888
28858
|
const methodDeclaration = node;
|
|
28889
|
-
const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.
|
|
28859
|
+
const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor";
|
|
28890
28860
|
return !nameIsConstructor;
|
|
28891
28861
|
}
|
|
28892
28862
|
}
|
|
@@ -29108,13 +29078,10 @@ ${lanes.join("\n")}
|
|
|
29108
29078
|
function parseEntityName(allowReservedWords, diagnosticMessage) {
|
|
29109
29079
|
const pos = getNodePos();
|
|
29110
29080
|
let entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
|
|
29111
|
-
let dotPos = getNodePos();
|
|
29112
29081
|
while (parseOptional(24 /* DotToken */)) {
|
|
29113
29082
|
if (token() === 29 /* LessThanToken */) {
|
|
29114
|
-
entity.jsdocDotPos = dotPos;
|
|
29115
29083
|
break;
|
|
29116
29084
|
}
|
|
29117
|
-
dotPos = getNodePos();
|
|
29118
29085
|
entity = finishNode(
|
|
29119
29086
|
factory2.createQualifiedName(
|
|
29120
29087
|
entity,
|
|
@@ -33894,7 +33861,7 @@ ${lanes.join("\n")}
|
|
|
33894
33861
|
return finishNode(jsDocNamespaceNode, pos);
|
|
33895
33862
|
}
|
|
33896
33863
|
if (nested) {
|
|
33897
|
-
typeNameOrNamespaceName.
|
|
33864
|
+
typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */;
|
|
33898
33865
|
}
|
|
33899
33866
|
return typeNameOrNamespaceName;
|
|
33900
33867
|
}
|
|
@@ -34098,12 +34065,7 @@ ${lanes.join("\n")}
|
|
|
34098
34065
|
const end2 = scanner2.getTextPos();
|
|
34099
34066
|
const originalKeywordKind = token();
|
|
34100
34067
|
const text = internIdentifier(scanner2.getTokenValue());
|
|
34101
|
-
const result = finishNode(factory2.createIdentifier(
|
|
34102
|
-
text,
|
|
34103
|
-
/*typeArguments*/
|
|
34104
|
-
void 0,
|
|
34105
|
-
originalKeywordKind
|
|
34106
|
-
), pos, end2);
|
|
34068
|
+
const result = finishNode(factory2.createIdentifier(text, originalKeywordKind), pos, end2);
|
|
34107
34069
|
nextTokenJSDoc();
|
|
34108
34070
|
return result;
|
|
34109
34071
|
}
|
|
@@ -36290,6 +36252,7 @@ ${lanes.join("\n")}
|
|
|
36290
36252
|
["es2020", "lib.es2020.d.ts"],
|
|
36291
36253
|
["es2021", "lib.es2021.d.ts"],
|
|
36292
36254
|
["es2022", "lib.es2022.d.ts"],
|
|
36255
|
+
["es2023", "lib.es2023.d.ts"],
|
|
36293
36256
|
["esnext", "lib.esnext.d.ts"],
|
|
36294
36257
|
// Host only
|
|
36295
36258
|
["dom", "lib.dom.d.ts"],
|
|
@@ -36343,7 +36306,8 @@ ${lanes.join("\n")}
|
|
|
36343
36306
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
36344
36307
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
36345
36308
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
36346
|
-
["
|
|
36309
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
36310
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
36347
36311
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
36348
36312
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
36349
36313
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -37822,7 +37786,7 @@ ${lanes.join("\n")}
|
|
|
37822
37786
|
Debug.assert(extensionIsTS(resolved.extension));
|
|
37823
37787
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
37824
37788
|
}
|
|
37825
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
|
|
37789
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
|
|
37826
37790
|
if (resultFromCache) {
|
|
37827
37791
|
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
37828
37792
|
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
@@ -37840,7 +37804,8 @@ ${lanes.join("\n")}
|
|
|
37840
37804
|
},
|
|
37841
37805
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
37842
37806
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
37843
|
-
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
37807
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
|
37808
|
+
node10Result: legacyResult
|
|
37844
37809
|
};
|
|
37845
37810
|
}
|
|
37846
37811
|
function initializeResolutionField(value) {
|
|
@@ -38880,7 +38845,7 @@ ${lanes.join("\n")}
|
|
|
38880
38845
|
);
|
|
38881
38846
|
}
|
|
38882
38847
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
38883
|
-
var _a2, _b;
|
|
38848
|
+
var _a2, _b, _c, _d;
|
|
38884
38849
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
38885
38850
|
const failedLookupLocations = [];
|
|
38886
38851
|
const affectingLocations = [];
|
|
@@ -38907,44 +38872,60 @@ ${lanes.join("\n")}
|
|
|
38907
38872
|
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
|
|
38908
38873
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
38909
38874
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
38910
|
-
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
38875
|
+
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
38911
38876
|
} else {
|
|
38912
|
-
result = tryResolve(extensions);
|
|
38877
|
+
result = tryResolve(extensions, state);
|
|
38878
|
+
}
|
|
38879
|
+
let legacyResult;
|
|
38880
|
+
if (((_a2 = result == null ? void 0 : result.value) == null ? void 0 : _a2.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) {
|
|
38881
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
38882
|
+
const diagnosticState = {
|
|
38883
|
+
...state,
|
|
38884
|
+
features: state.features & ~8 /* Exports */,
|
|
38885
|
+
failedLookupLocations: [],
|
|
38886
|
+
affectingLocations: [],
|
|
38887
|
+
reportDiagnostic: noop
|
|
38888
|
+
};
|
|
38889
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
38890
|
+
if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
|
|
38891
|
+
legacyResult = diagnosticResult.value.resolved.path;
|
|
38892
|
+
}
|
|
38913
38893
|
}
|
|
38914
38894
|
return createResolvedModuleWithFailedLookupLocations(
|
|
38915
|
-
(
|
|
38916
|
-
(
|
|
38895
|
+
(_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved,
|
|
38896
|
+
(_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport,
|
|
38917
38897
|
failedLookupLocations,
|
|
38918
38898
|
affectingLocations,
|
|
38919
38899
|
diagnostics,
|
|
38920
|
-
state.resultFromCache
|
|
38900
|
+
state.resultFromCache,
|
|
38901
|
+
legacyResult
|
|
38921
38902
|
);
|
|
38922
|
-
function tryResolve(extensions2) {
|
|
38923
|
-
const loader = (extensions3, candidate, onlyRecordFailures,
|
|
38903
|
+
function tryResolve(extensions2, state2) {
|
|
38904
|
+
const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
|
|
38924
38905
|
extensions3,
|
|
38925
38906
|
candidate,
|
|
38926
38907
|
onlyRecordFailures,
|
|
38927
|
-
|
|
38908
|
+
state3,
|
|
38928
38909
|
/*considerPackageJson*/
|
|
38929
38910
|
true
|
|
38930
38911
|
);
|
|
38931
|
-
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader,
|
|
38912
|
+
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);
|
|
38932
38913
|
if (resolved) {
|
|
38933
38914
|
return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
|
|
38934
38915
|
}
|
|
38935
38916
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
38936
38917
|
let resolved2;
|
|
38937
38918
|
if (features & 2 /* Imports */ && startsWith(moduleName, "#")) {
|
|
38938
|
-
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory,
|
|
38919
|
+
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38939
38920
|
}
|
|
38940
38921
|
if (!resolved2 && features & 4 /* SelfName */) {
|
|
38941
|
-
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory,
|
|
38922
|
+
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38942
38923
|
}
|
|
38943
38924
|
if (!resolved2) {
|
|
38944
38925
|
if (traceEnabled) {
|
|
38945
38926
|
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
38946
38927
|
}
|
|
38947
|
-
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory,
|
|
38928
|
+
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38948
38929
|
}
|
|
38949
38930
|
if (!resolved2)
|
|
38950
38931
|
return void 0;
|
|
@@ -38963,7 +38944,7 @@ ${lanes.join("\n")}
|
|
|
38963
38944
|
candidate,
|
|
38964
38945
|
/*onlyRecordFailures*/
|
|
38965
38946
|
false,
|
|
38966
|
-
|
|
38947
|
+
state2,
|
|
38967
38948
|
/*considerPackageJson*/
|
|
38968
38949
|
true
|
|
38969
38950
|
);
|
|
@@ -40318,7 +40299,7 @@ ${lanes.join("\n")}
|
|
|
40318
40299
|
case 264 /* ModuleDeclaration */:
|
|
40319
40300
|
return getModuleInstanceState(node, visited);
|
|
40320
40301
|
case 79 /* Identifier */:
|
|
40321
|
-
if (node.
|
|
40302
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
40322
40303
|
return 0 /* NonInstantiated */;
|
|
40323
40304
|
}
|
|
40324
40305
|
}
|
|
@@ -40754,6 +40735,7 @@ ${lanes.join("\n")}
|
|
|
40754
40735
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
40755
40736
|
seenThisKeyword = false;
|
|
40756
40737
|
bindChildren(node);
|
|
40738
|
+
Debug.assertNotNode(node, isIdentifier);
|
|
40757
40739
|
node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */;
|
|
40758
40740
|
} else {
|
|
40759
40741
|
bindChildren(node);
|
|
@@ -41913,13 +41895,14 @@ ${lanes.join("\n")}
|
|
|
41913
41895
|
}
|
|
41914
41896
|
function checkContextualIdentifier(node) {
|
|
41915
41897
|
if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
|
|
41916
|
-
|
|
41898
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
41899
|
+
if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
|
|
41917
41900
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41918
41901
|
node,
|
|
41919
41902
|
getStrictModeIdentifierMessage(node),
|
|
41920
41903
|
declarationNameToString(node)
|
|
41921
41904
|
));
|
|
41922
|
-
} else if (
|
|
41905
|
+
} else if (originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
41923
41906
|
if (isExternalModule(file) && isInTopLevelContext(node)) {
|
|
41924
41907
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41925
41908
|
node,
|
|
@@ -41933,7 +41916,7 @@ ${lanes.join("\n")}
|
|
|
41933
41916
|
declarationNameToString(node)
|
|
41934
41917
|
));
|
|
41935
41918
|
}
|
|
41936
|
-
} else if (
|
|
41919
|
+
} else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
|
|
41937
41920
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41938
41921
|
node,
|
|
41939
41922
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,
|
|
@@ -42145,7 +42128,7 @@ ${lanes.join("\n")}
|
|
|
42145
42128
|
function bindWorker(node) {
|
|
42146
42129
|
switch (node.kind) {
|
|
42147
42130
|
case 79 /* Identifier */:
|
|
42148
|
-
if (node.
|
|
42131
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
42149
42132
|
let parentNode = node.parent;
|
|
42150
42133
|
while (parentNode && !isJSDocTypeAlias(parentNode)) {
|
|
42151
42134
|
parentNode = parentNode.parent;
|
|
@@ -47116,6 +47099,8 @@ ${lanes.join("\n")}
|
|
|
47116
47099
|
/*isError*/
|
|
47117
47100
|
false,
|
|
47118
47101
|
errorNode,
|
|
47102
|
+
currentSourceFile,
|
|
47103
|
+
mode,
|
|
47119
47104
|
resolvedModule,
|
|
47120
47105
|
moduleReference
|
|
47121
47106
|
);
|
|
@@ -47201,6 +47186,8 @@ ${lanes.join("\n")}
|
|
|
47201
47186
|
/*isError*/
|
|
47202
47187
|
noImplicitAny && !!moduleNotFoundError,
|
|
47203
47188
|
errorNode,
|
|
47189
|
+
currentSourceFile,
|
|
47190
|
+
mode,
|
|
47204
47191
|
resolvedModule,
|
|
47205
47192
|
moduleReference
|
|
47206
47193
|
);
|
|
@@ -47255,26 +47242,37 @@ ${lanes.join("\n")}
|
|
|
47255
47242
|
return importSourceWithoutExtension;
|
|
47256
47243
|
}
|
|
47257
47244
|
}
|
|
47258
|
-
function errorOnImplicitAnyModule(isError, errorNode, { packageId, resolvedFileName }, moduleReference) {
|
|
47259
|
-
|
|
47260
|
-
|
|
47261
|
-
|
|
47262
|
-
|
|
47263
|
-
|
|
47264
|
-
|
|
47265
|
-
|
|
47266
|
-
|
|
47267
|
-
|
|
47268
|
-
|
|
47269
|
-
packageId.name
|
|
47270
|
-
|
|
47271
|
-
|
|
47272
|
-
|
|
47273
|
-
|
|
47274
|
-
|
|
47275
|
-
|
|
47276
|
-
|
|
47277
|
-
|
|
47245
|
+
function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {
|
|
47246
|
+
var _a2, _b;
|
|
47247
|
+
let errorInfo;
|
|
47248
|
+
if (!isExternalModuleNameRelative(moduleReference) && packageId) {
|
|
47249
|
+
const node10Result = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleReference, mode)) == null ? void 0 : _b.node10Result;
|
|
47250
|
+
errorInfo = node10Result ? chainDiagnosticMessages(
|
|
47251
|
+
/*details*/
|
|
47252
|
+
void 0,
|
|
47253
|
+
Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,
|
|
47254
|
+
node10Result,
|
|
47255
|
+
node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name
|
|
47256
|
+
) : typesPackageExists(packageId.name) ? chainDiagnosticMessages(
|
|
47257
|
+
/*details*/
|
|
47258
|
+
void 0,
|
|
47259
|
+
Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,
|
|
47260
|
+
packageId.name,
|
|
47261
|
+
mangleScopedPackageName(packageId.name)
|
|
47262
|
+
) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
|
|
47263
|
+
/*details*/
|
|
47264
|
+
void 0,
|
|
47265
|
+
Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
|
|
47266
|
+
packageId.name,
|
|
47267
|
+
moduleReference
|
|
47268
|
+
) : chainDiagnosticMessages(
|
|
47269
|
+
/*details*/
|
|
47270
|
+
void 0,
|
|
47271
|
+
Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
|
47272
|
+
moduleReference,
|
|
47273
|
+
mangleScopedPackageName(packageId.name)
|
|
47274
|
+
);
|
|
47275
|
+
}
|
|
47278
47276
|
errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
|
|
47279
47277
|
errorInfo,
|
|
47280
47278
|
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
|
@@ -48931,13 +48929,17 @@ ${lanes.join("\n")}
|
|
|
48931
48929
|
let qualifier = root.qualifier;
|
|
48932
48930
|
if (qualifier) {
|
|
48933
48931
|
if (isIdentifier(qualifier)) {
|
|
48934
|
-
|
|
48932
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier)) {
|
|
48933
|
+
qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);
|
|
48934
|
+
}
|
|
48935
48935
|
} else {
|
|
48936
|
-
|
|
48937
|
-
qualifier
|
|
48938
|
-
|
|
48939
|
-
|
|
48940
|
-
|
|
48936
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {
|
|
48937
|
+
qualifier = factory.updateQualifiedName(
|
|
48938
|
+
qualifier,
|
|
48939
|
+
qualifier.left,
|
|
48940
|
+
setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)
|
|
48941
|
+
);
|
|
48942
|
+
}
|
|
48941
48943
|
}
|
|
48942
48944
|
}
|
|
48943
48945
|
typeArguments = ref.typeArguments;
|
|
@@ -48957,13 +48959,17 @@ ${lanes.join("\n")}
|
|
|
48957
48959
|
let typeArguments = root.typeArguments;
|
|
48958
48960
|
let typeName = root.typeName;
|
|
48959
48961
|
if (isIdentifier(typeName)) {
|
|
48960
|
-
|
|
48962
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName)) {
|
|
48963
|
+
typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);
|
|
48964
|
+
}
|
|
48961
48965
|
} else {
|
|
48962
|
-
|
|
48963
|
-
typeName
|
|
48964
|
-
|
|
48965
|
-
|
|
48966
|
-
|
|
48966
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {
|
|
48967
|
+
typeName = factory.updateQualifiedName(
|
|
48968
|
+
typeName,
|
|
48969
|
+
typeName.left,
|
|
48970
|
+
setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)
|
|
48971
|
+
);
|
|
48972
|
+
}
|
|
48967
48973
|
}
|
|
48968
48974
|
typeArguments = ref.typeArguments;
|
|
48969
48975
|
const ids = getAccessStack(ref);
|
|
@@ -49677,7 +49683,11 @@ ${lanes.join("\n")}
|
|
|
49677
49683
|
if (!nonRootParts || isEntityName(nonRootParts)) {
|
|
49678
49684
|
if (nonRootParts) {
|
|
49679
49685
|
const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
49680
|
-
|
|
49686
|
+
setIdentifierTypeArguments(
|
|
49687
|
+
lastId,
|
|
49688
|
+
/*typeArguments*/
|
|
49689
|
+
void 0
|
|
49690
|
+
);
|
|
49681
49691
|
}
|
|
49682
49692
|
return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
49683
49693
|
} else {
|
|
@@ -49694,8 +49704,12 @@ ${lanes.join("\n")}
|
|
|
49694
49704
|
return factory.createTypeQueryNode(entityName);
|
|
49695
49705
|
} else {
|
|
49696
49706
|
const lastId = isIdentifier(entityName) ? entityName : entityName.right;
|
|
49697
|
-
const lastTypeArgs = lastId
|
|
49698
|
-
|
|
49707
|
+
const lastTypeArgs = getIdentifierTypeArguments(lastId);
|
|
49708
|
+
setIdentifierTypeArguments(
|
|
49709
|
+
lastId,
|
|
49710
|
+
/*typeArguments*/
|
|
49711
|
+
void 0
|
|
49712
|
+
);
|
|
49699
49713
|
return factory.createTypeReferenceNode(entityName, lastTypeArgs);
|
|
49700
49714
|
}
|
|
49701
49715
|
function createAccessFromSymbolChain(chain2, index, stopper) {
|
|
@@ -49739,7 +49753,9 @@ ${lanes.join("\n")}
|
|
|
49739
49753
|
return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
|
|
49740
49754
|
}
|
|
49741
49755
|
}
|
|
49742
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49756
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49757
|
+
if (typeParameterNodes)
|
|
49758
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49743
49759
|
identifier.symbol = symbol2;
|
|
49744
49760
|
if (index > stopper) {
|
|
49745
49761
|
const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);
|
|
@@ -49797,7 +49813,9 @@ ${lanes.join("\n")}
|
|
|
49797
49813
|
text = `${rawtext}_${i}`;
|
|
49798
49814
|
}
|
|
49799
49815
|
if (text !== rawtext) {
|
|
49800
|
-
|
|
49816
|
+
const typeArguments = getIdentifierTypeArguments(result);
|
|
49817
|
+
result = factory.createIdentifier(text);
|
|
49818
|
+
setIdentifierTypeArguments(result, typeArguments);
|
|
49801
49819
|
}
|
|
49802
49820
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
49803
49821
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
@@ -49821,7 +49839,9 @@ ${lanes.join("\n")}
|
|
|
49821
49839
|
if (index === 0) {
|
|
49822
49840
|
context.flags ^= 16777216 /* InInitialEntityName */;
|
|
49823
49841
|
}
|
|
49824
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49842
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49843
|
+
if (typeParameterNodes)
|
|
49844
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49825
49845
|
identifier.symbol = symbol2;
|
|
49826
49846
|
return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
49827
49847
|
}
|
|
@@ -49844,7 +49864,9 @@ ${lanes.join("\n")}
|
|
|
49844
49864
|
return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
|
|
49845
49865
|
}
|
|
49846
49866
|
if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
49847
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49867
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49868
|
+
if (typeParameterNodes)
|
|
49869
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49848
49870
|
identifier.symbol = symbol2;
|
|
49849
49871
|
return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
49850
49872
|
} else {
|
|
@@ -49859,8 +49881,11 @@ ${lanes.join("\n")}
|
|
|
49859
49881
|
expression = factory.createNumericLiteral(+symbolName2);
|
|
49860
49882
|
}
|
|
49861
49883
|
if (!expression) {
|
|
49862
|
-
|
|
49863
|
-
|
|
49884
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49885
|
+
if (typeParameterNodes)
|
|
49886
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49887
|
+
identifier.symbol = symbol2;
|
|
49888
|
+
expression = identifier;
|
|
49864
49889
|
}
|
|
49865
49890
|
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);
|
|
49866
49891
|
}
|
|
@@ -54690,7 +54715,7 @@ ${lanes.join("\n")}
|
|
|
54690
54715
|
}
|
|
54691
54716
|
function isConstTypeVariable(type) {
|
|
54692
54717
|
var _a2;
|
|
54693
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54718
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
54694
54719
|
}
|
|
54695
54720
|
function getConstraintOfIndexedAccess(type) {
|
|
54696
54721
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -63375,19 +63400,22 @@ ${lanes.join("\n")}
|
|
|
63375
63400
|
break;
|
|
63376
63401
|
case 166 /* Parameter */:
|
|
63377
63402
|
const param = declaration;
|
|
63378
|
-
if (isIdentifier(param.name)
|
|
63379
|
-
param
|
|
63380
|
-
param.
|
|
63381
|
-
|
|
63382
|
-
|
|
63383
|
-
|
|
63384
|
-
|
|
63385
|
-
|
|
63386
|
-
|
|
63387
|
-
|
|
63388
|
-
|
|
63389
|
-
|
|
63390
|
-
|
|
63403
|
+
if (isIdentifier(param.name)) {
|
|
63404
|
+
const originalKeywordKind = identifierToKeywordKind(param.name);
|
|
63405
|
+
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
|
|
63406
|
+
param,
|
|
63407
|
+
param.name.escapedText,
|
|
63408
|
+
788968 /* Type */,
|
|
63409
|
+
void 0,
|
|
63410
|
+
param.name.escapedText,
|
|
63411
|
+
/*isUse*/
|
|
63412
|
+
true
|
|
63413
|
+
) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {
|
|
63414
|
+
const newName = "arg" + param.parent.parameters.indexOf(param);
|
|
63415
|
+
const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
63416
|
+
errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
63417
|
+
return;
|
|
63418
|
+
}
|
|
63391
63419
|
}
|
|
63392
63420
|
diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;
|
|
63393
63421
|
break;
|
|
@@ -63575,6 +63603,10 @@ ${lanes.join("\n")}
|
|
|
63575
63603
|
function isTypeParameterAtTopLevel(type, typeParameter) {
|
|
63576
63604
|
return !!(type === typeParameter || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isTypeParameterAtTopLevel(t, typeParameter)) || type.flags & 16777216 /* Conditional */ && (getTrueTypeFromConditionalType(type) === typeParameter || getFalseTypeFromConditionalType(type) === typeParameter));
|
|
63577
63605
|
}
|
|
63606
|
+
function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {
|
|
63607
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
63608
|
+
return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);
|
|
63609
|
+
}
|
|
63578
63610
|
function createEmptyObjectTypeFromStringLiteral(type) {
|
|
63579
63611
|
const members = createSymbolTable();
|
|
63580
63612
|
forEachType(type, (t) => {
|
|
@@ -64446,7 +64478,7 @@ ${lanes.join("\n")}
|
|
|
64446
64478
|
function getCovariantInference(inference, signature) {
|
|
64447
64479
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
64448
64480
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
64449
|
-
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !
|
|
64481
|
+
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
64450
64482
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
64451
64483
|
const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
64452
64484
|
return getWidenedType(unwidenedType);
|
|
@@ -66599,6 +66631,7 @@ ${lanes.join("\n")}
|
|
|
66599
66631
|
}
|
|
66600
66632
|
}
|
|
66601
66633
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
66634
|
+
var _a2;
|
|
66602
66635
|
const type = getTypeOfSymbol(symbol);
|
|
66603
66636
|
const declaration = symbol.valueDeclaration;
|
|
66604
66637
|
if (declaration) {
|
|
@@ -66634,7 +66667,7 @@ ${lanes.join("\n")}
|
|
|
66634
66667
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
66635
66668
|
const contextualSignature = getContextualSignature(func);
|
|
66636
66669
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
66637
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
66670
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
66638
66671
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
66639
66672
|
const narrowedType = getFlowTypeOfReference(
|
|
66640
66673
|
func,
|
|
@@ -67855,7 +67888,9 @@ ${lanes.join("\n")}
|
|
|
67855
67888
|
}
|
|
67856
67889
|
const index = findContextualNode(node);
|
|
67857
67890
|
if (index >= 0) {
|
|
67858
|
-
|
|
67891
|
+
const cached = contextualTypes[index];
|
|
67892
|
+
if (cached || !contextFlags)
|
|
67893
|
+
return cached;
|
|
67859
67894
|
}
|
|
67860
67895
|
const { parent: parent2 } = node;
|
|
67861
67896
|
switch (parent2.kind) {
|
|
@@ -75175,8 +75210,11 @@ ${lanes.join("\n")}
|
|
|
75175
75210
|
}
|
|
75176
75211
|
function checkTypeReferenceNode(node) {
|
|
75177
75212
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
75178
|
-
if (node.kind === 180 /* TypeReference */ &&
|
|
75179
|
-
|
|
75213
|
+
if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
75214
|
+
const sourceFile = getSourceFileOfNode(node);
|
|
75215
|
+
if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) {
|
|
75216
|
+
grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
|
|
75217
|
+
}
|
|
75180
75218
|
}
|
|
75181
75219
|
forEach(node.typeArguments, checkSourceElement);
|
|
75182
75220
|
const type = getTypeFromTypeReference(node);
|
|
@@ -80785,8 +80823,9 @@ ${lanes.join("\n")}
|
|
|
80785
80823
|
}
|
|
80786
80824
|
}
|
|
80787
80825
|
function getReferencedImportDeclaration(nodeIn) {
|
|
80788
|
-
|
|
80789
|
-
|
|
80826
|
+
const specifier = getIdentifierGeneratedImportReference(nodeIn);
|
|
80827
|
+
if (specifier) {
|
|
80828
|
+
return specifier;
|
|
80790
80829
|
}
|
|
80791
80830
|
const node = getParseTreeNode(nodeIn, isIdentifier);
|
|
80792
80831
|
if (node) {
|
|
@@ -82764,7 +82803,7 @@ ${lanes.join("\n")}
|
|
|
82764
82803
|
}
|
|
82765
82804
|
function checkGrammarNameInLetOrConstDeclarations(name) {
|
|
82766
82805
|
if (name.kind === 79 /* Identifier */) {
|
|
82767
|
-
if (name.
|
|
82806
|
+
if (name.escapedText === "let") {
|
|
82768
82807
|
return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
|
|
82769
82808
|
}
|
|
82770
82809
|
} else {
|
|
@@ -83710,12 +83749,6 @@ ${lanes.join("\n")}
|
|
|
83710
83749
|
"use strict";
|
|
83711
83750
|
init_ts2();
|
|
83712
83751
|
visitEachChildTable = {
|
|
83713
|
-
[79 /* Identifier */]: function visitEachChildOfIdentifier(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
83714
|
-
return context.factory.updateIdentifier(
|
|
83715
|
-
node,
|
|
83716
|
-
nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration)
|
|
83717
|
-
);
|
|
83718
|
-
},
|
|
83719
83752
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83720
83753
|
return context.factory.updateQualifiedName(
|
|
83721
83754
|
node,
|
|
@@ -88955,7 +88988,7 @@ ${lanes.join("\n")}
|
|
|
88955
88988
|
if (isClassWithConstructorReference) {
|
|
88956
88989
|
enableSubstitutionForClassAliases();
|
|
88957
88990
|
const alias = factory2.cloneNode(temp);
|
|
88958
|
-
alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
88991
|
+
alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
88959
88992
|
classAliases[getOriginalNodeId(node)] = alias;
|
|
88960
88993
|
}
|
|
88961
88994
|
setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
|
|
@@ -93152,7 +93185,7 @@ ${lanes.join("\n")}
|
|
|
93152
93185
|
factory2.createIdentifier(name),
|
|
93153
93186
|
generatedName
|
|
93154
93187
|
);
|
|
93155
|
-
generatedName
|
|
93188
|
+
setIdentifierGeneratedImportReference(generatedName, specifier);
|
|
93156
93189
|
specifierSourceImports.set(name, specifier);
|
|
93157
93190
|
return generatedName;
|
|
93158
93191
|
}
|
|
@@ -94308,7 +94341,7 @@ ${lanes.join("\n")}
|
|
|
94308
94341
|
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
|
|
94309
94342
|
}
|
|
94310
94343
|
}
|
|
94311
|
-
if (node.
|
|
94344
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
94312
94345
|
return setOriginalNode(setTextRange(
|
|
94313
94346
|
factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),
|
|
94314
94347
|
node
|
|
@@ -97195,7 +97228,7 @@ ${lanes.join("\n")}
|
|
|
97195
97228
|
return node;
|
|
97196
97229
|
}
|
|
97197
97230
|
function trySubstituteReservedName(name) {
|
|
97198
|
-
const token =
|
|
97231
|
+
const token = identifierToKeywordKind(name);
|
|
97199
97232
|
if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) {
|
|
97200
97233
|
return setTextRange(factory2.createStringLiteralFromNode(name), name);
|
|
97201
97234
|
}
|
|
@@ -100875,7 +100908,7 @@ ${lanes.join("\n")}
|
|
|
100875
100908
|
return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
|
|
100876
100909
|
}
|
|
100877
100910
|
return node;
|
|
100878
|
-
} else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
100911
|
+
} else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
100879
100912
|
const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
|
|
100880
100913
|
if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
|
|
100881
100914
|
return setTextRange(
|
|
@@ -106842,7 +106875,7 @@ ${lanes.join("\n")}
|
|
|
106842
106875
|
/*includeTrivia*/
|
|
106843
106876
|
false
|
|
106844
106877
|
), node.symbol);
|
|
106845
|
-
emitList(node, node
|
|
106878
|
+
emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);
|
|
106846
106879
|
}
|
|
106847
106880
|
function emitPrivateIdentifier(node) {
|
|
106848
106881
|
write(getTextOfNode2(
|
|
@@ -109560,10 +109593,11 @@ ${lanes.join("\n")}
|
|
|
109560
109593
|
}
|
|
109561
109594
|
}
|
|
109562
109595
|
function generateName(name) {
|
|
109563
|
-
|
|
109564
|
-
|
|
109596
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
109597
|
+
if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
|
|
109598
|
+
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);
|
|
109565
109599
|
} else {
|
|
109566
|
-
const autoGenerateId =
|
|
109600
|
+
const autoGenerateId = autoGenerate.id;
|
|
109567
109601
|
return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
|
|
109568
109602
|
}
|
|
109569
109603
|
}
|
|
@@ -109843,16 +109877,17 @@ ${lanes.join("\n")}
|
|
|
109843
109877
|
}
|
|
109844
109878
|
}
|
|
109845
109879
|
function makeName(name) {
|
|
109846
|
-
const
|
|
109847
|
-
const
|
|
109848
|
-
|
|
109880
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
109881
|
+
const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);
|
|
109882
|
+
const suffix = formatGeneratedNamePart(autoGenerate.suffix);
|
|
109883
|
+
switch (autoGenerate.flags & 7 /* KindMask */) {
|
|
109849
109884
|
case 1 /* Auto */:
|
|
109850
|
-
return makeTempVariableName(TempFlags.Auto, !!(
|
|
109885
|
+
return makeTempVariableName(TempFlags.Auto, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
|
|
109851
109886
|
case 2 /* Loop */:
|
|
109852
109887
|
Debug.assertNode(name, isIdentifier);
|
|
109853
109888
|
return makeTempVariableName(
|
|
109854
109889
|
TempFlags._i,
|
|
109855
|
-
!!(
|
|
109890
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
109856
109891
|
/*privateName*/
|
|
109857
109892
|
false,
|
|
109858
109893
|
prefix,
|
|
@@ -109861,16 +109896,16 @@ ${lanes.join("\n")}
|
|
|
109861
109896
|
case 3 /* Unique */:
|
|
109862
109897
|
return makeUniqueName2(
|
|
109863
109898
|
idText(name),
|
|
109864
|
-
|
|
109865
|
-
!!(
|
|
109866
|
-
!!(
|
|
109899
|
+
autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
|
|
109900
|
+
!!(autoGenerate.flags & 16 /* Optimistic */),
|
|
109901
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
109867
109902
|
isPrivateIdentifier(name),
|
|
109868
109903
|
prefix,
|
|
109869
109904
|
suffix
|
|
109870
109905
|
);
|
|
109871
109906
|
}
|
|
109872
109907
|
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(
|
|
109873
|
-
|
|
109908
|
+
autoGenerate.flags & 7 /* KindMask */,
|
|
109874
109909
|
GeneratedIdentifierFlags,
|
|
109875
109910
|
/*isFlags*/
|
|
109876
109911
|
true
|
|
@@ -134624,8 +134659,8 @@ ${lanes.join("\n")}
|
|
|
134624
134659
|
function collectExportRenames(sourceFile, checker, identifiers) {
|
|
134625
134660
|
const res = /* @__PURE__ */ new Map();
|
|
134626
134661
|
forEachExportReference(sourceFile, (node) => {
|
|
134627
|
-
const { text
|
|
134628
|
-
if (!res.has(text) && (
|
|
134662
|
+
const { text } = node.name;
|
|
134663
|
+
if (!res.has(text) && (isIdentifierANonContextualKeyword(node.name) || checker.resolveName(
|
|
134629
134664
|
text,
|
|
134630
134665
|
node,
|
|
134631
134666
|
111551 /* Value */,
|
|
@@ -143747,8 +143782,11 @@ ${lanes.join("\n")}
|
|
|
143747
143782
|
if (isModifier(node)) {
|
|
143748
143783
|
return node.kind;
|
|
143749
143784
|
}
|
|
143750
|
-
if (isIdentifier(node)
|
|
143751
|
-
|
|
143785
|
+
if (isIdentifier(node)) {
|
|
143786
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
143787
|
+
if (originalKeywordKind && isModifierKind(originalKeywordKind)) {
|
|
143788
|
+
return originalKeywordKind;
|
|
143789
|
+
}
|
|
143752
143790
|
}
|
|
143753
143791
|
return void 0;
|
|
143754
143792
|
}
|
|
@@ -145917,7 +145955,8 @@ ${lanes.join("\n")}
|
|
|
145917
145955
|
return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
|
|
145918
145956
|
}
|
|
145919
145957
|
function keywordForNode(node) {
|
|
145920
|
-
|
|
145958
|
+
var _a2;
|
|
145959
|
+
return isIdentifier(node) ? (_a2 = identifierToKeywordKind(node)) != null ? _a2 : 0 /* Unknown */ : node.kind;
|
|
145921
145960
|
}
|
|
145922
145961
|
function getContextualKeywords(contextToken, position) {
|
|
145923
145962
|
const entries = [];
|
|
@@ -145963,6 +146002,7 @@ ${lanes.join("\n")}
|
|
|
145963
146002
|
return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined");
|
|
145964
146003
|
}
|
|
145965
146004
|
function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
|
|
146005
|
+
var _a2;
|
|
145966
146006
|
switch (location.kind) {
|
|
145967
146007
|
case 353 /* SyntaxList */:
|
|
145968
146008
|
return tryCast(location.parent, isObjectTypeDeclaration);
|
|
@@ -145973,8 +146013,8 @@ ${lanes.join("\n")}
|
|
|
145973
146013
|
}
|
|
145974
146014
|
break;
|
|
145975
146015
|
case 79 /* Identifier */: {
|
|
145976
|
-
const originalKeywordKind = location
|
|
145977
|
-
if (originalKeywordKind
|
|
146016
|
+
const originalKeywordKind = identifierToKeywordKind(location);
|
|
146017
|
+
if (originalKeywordKind) {
|
|
145978
146018
|
return void 0;
|
|
145979
146019
|
}
|
|
145980
146020
|
if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {
|
|
@@ -146000,14 +146040,14 @@ ${lanes.join("\n")}
|
|
|
146000
146040
|
case 27 /* CommaToken */:
|
|
146001
146041
|
return tryCast(contextToken.parent, isObjectTypeDeclaration);
|
|
146002
146042
|
default:
|
|
146003
|
-
if (
|
|
146004
|
-
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line
|
|
146043
|
+
if (isObjectTypeDeclaration(location)) {
|
|
146044
|
+
if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) {
|
|
146005
146045
|
return location;
|
|
146006
146046
|
}
|
|
146007
|
-
|
|
146047
|
+
const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
|
|
146048
|
+
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146008
146049
|
}
|
|
146009
|
-
|
|
146010
|
-
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword(stringToToken(contextToken.text)) ? contextToken.parent.parent : void 0;
|
|
146050
|
+
return void 0;
|
|
146011
146051
|
}
|
|
146012
146052
|
}
|
|
146013
146053
|
function tryGetTypeLiteralNode(node) {
|
|
@@ -149052,7 +149092,7 @@ ${lanes.join("\n")}
|
|
|
149052
149092
|
}
|
|
149053
149093
|
}
|
|
149054
149094
|
if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) {
|
|
149055
|
-
const isDefaultExport = referenceLocation.
|
|
149095
|
+
const isDefaultExport = referenceLocation.escapedText === "default" || exportSpecifier.name.escapedText === "default";
|
|
149056
149096
|
const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */;
|
|
149057
149097
|
const exportSymbol = Debug.checkDefined(exportSpecifier.symbol);
|
|
149058
149098
|
const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker);
|
|
@@ -155931,7 +155971,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155931
155971
|
111551 /* Value */,
|
|
155932
155972
|
/*excludeGlobals*/
|
|
155933
155973
|
false
|
|
155934
|
-
) && !isPrivateIdentifier(node.name) && !
|
|
155974
|
+
) && !isPrivateIdentifier(node.name) && !identifierToKeywordKind(node.name) ? node.name.text : getUniqueName(isClassLike(scope) ? "newProperty" : "newLocal", file);
|
|
155935
155975
|
const isJS = isInJSFile(scope);
|
|
155936
155976
|
let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */);
|
|
155937
155977
|
let initializer = transformConstantInitializer(skipParentheses(node), substitutions);
|
|
@@ -156946,7 +156986,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156946
156986
|
if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) {
|
|
156947
156987
|
return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
|
|
156948
156988
|
}
|
|
156949
|
-
if (isIdentifier(node) && node.
|
|
156989
|
+
if (isIdentifier(node) && node.escapedText === "default" && symbol.parent && symbol.parent.flags & 1536 /* Module */) {
|
|
156950
156990
|
return void 0;
|
|
156951
156991
|
}
|
|
156952
156992
|
if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) {
|
|
@@ -158651,7 +158691,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158651
158691
|
}
|
|
158652
158692
|
const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent;
|
|
158653
158693
|
jsDocNode.jsDoc = parent2.jsDoc;
|
|
158654
|
-
jsDocNode.jsDocCache = parent2.jsDocCache;
|
|
158655
158694
|
return jsDocNode;
|
|
158656
158695
|
}
|
|
158657
158696
|
function tryMergeJsdocTags(oldTag, newTag) {
|
|
@@ -162703,7 +162742,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
162703
162742
|
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
162704
162743
|
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
162705
162744
|
const since = typeof options.since === "string" ? new Version(options.since) : (_b = options.since) != null ? _b : warnAfter;
|
|
162706
|
-
const error = options.error || errorAfter && version2.compareTo(errorAfter)
|
|
162745
|
+
const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0;
|
|
162707
162746
|
const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;
|
|
162708
162747
|
return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
162709
162748
|
}
|
|
@@ -163101,8 +163140,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
163101
163140
|
createIdentifier = deprecate(function createIdentifier2(text) {
|
|
163102
163141
|
return factory.createIdentifier(
|
|
163103
163142
|
text,
|
|
163104
|
-
/*typeArguments*/
|
|
163105
|
-
void 0,
|
|
163106
163143
|
/*originalKeywordKind*/
|
|
163107
163144
|
void 0
|
|
163108
163145
|
);
|
|
@@ -164098,6 +164135,44 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164098
164135
|
}
|
|
164099
164136
|
});
|
|
164100
164137
|
|
|
164138
|
+
// src/deprecatedCompat/5.0/identifierProperties.ts
|
|
164139
|
+
var init_identifierProperties = __esm({
|
|
164140
|
+
"src/deprecatedCompat/5.0/identifierProperties.ts"() {
|
|
164141
|
+
"use strict";
|
|
164142
|
+
init_ts5();
|
|
164143
|
+
init_deprecate();
|
|
164144
|
+
addObjectAllocatorPatcher((objectAllocator2) => {
|
|
164145
|
+
const Identifier75 = objectAllocator2.getIdentifierConstructor();
|
|
164146
|
+
if (!hasProperty(Identifier75.prototype, "originalKeywordKind")) {
|
|
164147
|
+
Object.defineProperty(Identifier75.prototype, "originalKeywordKind", {
|
|
164148
|
+
get: deprecate(function() {
|
|
164149
|
+
return identifierToKeywordKind(this);
|
|
164150
|
+
}, {
|
|
164151
|
+
name: "originalKeywordKind",
|
|
164152
|
+
since: "5.0",
|
|
164153
|
+
warnAfter: "5.1",
|
|
164154
|
+
errorAfter: "5.2",
|
|
164155
|
+
message: "Use 'identifierToKeywordKind(identifier)' instead."
|
|
164156
|
+
})
|
|
164157
|
+
});
|
|
164158
|
+
}
|
|
164159
|
+
if (!hasProperty(Identifier75.prototype, "isInJSDocNamespace")) {
|
|
164160
|
+
Object.defineProperty(Identifier75.prototype, "isInJSDocNamespace", {
|
|
164161
|
+
get: deprecate(function() {
|
|
164162
|
+
return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0;
|
|
164163
|
+
}, {
|
|
164164
|
+
name: "isInJSDocNamespace",
|
|
164165
|
+
since: "5.0",
|
|
164166
|
+
warnAfter: "5.1",
|
|
164167
|
+
errorAfter: "5.2",
|
|
164168
|
+
message: "Use '.parent' or the surrounding context to determine this instead."
|
|
164169
|
+
})
|
|
164170
|
+
});
|
|
164171
|
+
}
|
|
164172
|
+
});
|
|
164173
|
+
}
|
|
164174
|
+
});
|
|
164175
|
+
|
|
164101
164176
|
// src/deprecatedCompat/_namespaces/ts.ts
|
|
164102
164177
|
var init_ts5 = __esm({
|
|
164103
164178
|
"src/deprecatedCompat/_namespaces/ts.ts"() {
|
|
@@ -164111,6 +164186,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164111
164186
|
init_importTypeAssertions();
|
|
164112
164187
|
init_typeParameterModifiers();
|
|
164113
164188
|
init_mergeDecoratorsAndModifiers();
|
|
164189
|
+
init_identifierProperties();
|
|
164114
164190
|
}
|
|
164115
164191
|
});
|
|
164116
164192
|
|
|
@@ -175123,6 +175199,7 @@ ${e.message}`;
|
|
|
175123
175199
|
addEmitHelper: () => addEmitHelper,
|
|
175124
175200
|
addEmitHelpers: () => addEmitHelpers,
|
|
175125
175201
|
addNodeFactoryPatcher: () => addNodeFactoryPatcher,
|
|
175202
|
+
addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,
|
|
175126
175203
|
addRange: () => addRange,
|
|
175127
175204
|
addRelatedInfo: () => addRelatedInfo,
|
|
175128
175205
|
addSyntheticLeadingComment: () => addSyntheticLeadingComment,
|
|
@@ -175891,6 +175968,9 @@ ${e.message}`;
|
|
|
175891
175968
|
getGeneratedNameForNode: () => getGeneratedNameForNode,
|
|
175892
175969
|
getHeritageClause: () => getHeritageClause,
|
|
175893
175970
|
getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,
|
|
175971
|
+
getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,
|
|
175972
|
+
getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,
|
|
175973
|
+
getIdentifierTypeArguments: () => getIdentifierTypeArguments,
|
|
175894
175974
|
getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,
|
|
175895
175975
|
getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,
|
|
175896
175976
|
getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,
|
|
@@ -176224,6 +176304,7 @@ ${e.message}`;
|
|
|
176224
176304
|
hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,
|
|
176225
176305
|
idText: () => idText,
|
|
176226
176306
|
identifierIsThisKeyword: () => identifierIsThisKeyword,
|
|
176307
|
+
identifierToKeywordKind: () => identifierToKeywordKind,
|
|
176227
176308
|
identity: () => identity,
|
|
176228
176309
|
identitySourceMapConsumer: () => identitySourceMapConsumer,
|
|
176229
176310
|
ignoreSourceNewlines: () => ignoreSourceNewlines,
|
|
@@ -177113,6 +177194,7 @@ ${e.message}`;
|
|
|
177113
177194
|
sameMap: () => sameMap,
|
|
177114
177195
|
sameMapping: () => sameMapping,
|
|
177115
177196
|
scanShebangTrivia: () => scanShebangTrivia,
|
|
177197
|
+
scanTokenAtPosition: () => scanTokenAtPosition,
|
|
177116
177198
|
scanner: () => scanner,
|
|
177117
177199
|
screenStartingMessageCodes: () => screenStartingMessageCodes,
|
|
177118
177200
|
semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,
|
|
@@ -177125,6 +177207,9 @@ ${e.message}`;
|
|
|
177125
177207
|
setEachParent: () => setEachParent,
|
|
177126
177208
|
setEmitFlags: () => setEmitFlags,
|
|
177127
177209
|
setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,
|
|
177210
|
+
setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,
|
|
177211
|
+
setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,
|
|
177212
|
+
setIdentifierTypeArguments: () => setIdentifierTypeArguments,
|
|
177128
177213
|
setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,
|
|
177129
177214
|
setModuleDefaultHelper: () => setModuleDefaultHelper,
|
|
177130
177215
|
setNodeFlags: () => setNodeFlags,
|
|
@@ -177764,6 +177849,7 @@ ${e.message}`;
|
|
|
177764
177849
|
addEmitHelper: () => addEmitHelper,
|
|
177765
177850
|
addEmitHelpers: () => addEmitHelpers,
|
|
177766
177851
|
addNodeFactoryPatcher: () => addNodeFactoryPatcher,
|
|
177852
|
+
addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,
|
|
177767
177853
|
addRange: () => addRange,
|
|
177768
177854
|
addRelatedInfo: () => addRelatedInfo,
|
|
177769
177855
|
addSyntheticLeadingComment: () => addSyntheticLeadingComment,
|
|
@@ -178532,6 +178618,9 @@ ${e.message}`;
|
|
|
178532
178618
|
getGeneratedNameForNode: () => getGeneratedNameForNode,
|
|
178533
178619
|
getHeritageClause: () => getHeritageClause,
|
|
178534
178620
|
getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,
|
|
178621
|
+
getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,
|
|
178622
|
+
getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,
|
|
178623
|
+
getIdentifierTypeArguments: () => getIdentifierTypeArguments,
|
|
178535
178624
|
getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,
|
|
178536
178625
|
getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,
|
|
178537
178626
|
getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,
|
|
@@ -178865,6 +178954,7 @@ ${e.message}`;
|
|
|
178865
178954
|
hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,
|
|
178866
178955
|
idText: () => idText,
|
|
178867
178956
|
identifierIsThisKeyword: () => identifierIsThisKeyword,
|
|
178957
|
+
identifierToKeywordKind: () => identifierToKeywordKind,
|
|
178868
178958
|
identity: () => identity,
|
|
178869
178959
|
identitySourceMapConsumer: () => identitySourceMapConsumer,
|
|
178870
178960
|
ignoreSourceNewlines: () => ignoreSourceNewlines,
|
|
@@ -179754,6 +179844,7 @@ ${e.message}`;
|
|
|
179754
179844
|
sameMap: () => sameMap,
|
|
179755
179845
|
sameMapping: () => sameMapping,
|
|
179756
179846
|
scanShebangTrivia: () => scanShebangTrivia,
|
|
179847
|
+
scanTokenAtPosition: () => scanTokenAtPosition,
|
|
179757
179848
|
scanner: () => scanner,
|
|
179758
179849
|
screenStartingMessageCodes: () => screenStartingMessageCodes,
|
|
179759
179850
|
semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,
|
|
@@ -179766,6 +179857,9 @@ ${e.message}`;
|
|
|
179766
179857
|
setEachParent: () => setEachParent,
|
|
179767
179858
|
setEmitFlags: () => setEmitFlags,
|
|
179768
179859
|
setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,
|
|
179860
|
+
setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,
|
|
179861
|
+
setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,
|
|
179862
|
+
setIdentifierTypeArguments: () => setIdentifierTypeArguments,
|
|
179769
179863
|
setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,
|
|
179770
179864
|
setModuleDefaultHelper: () => setModuleDefaultHelper,
|
|
179771
179865
|
setNodeFlags: () => setNodeFlags,
|