typescript 5.0.0-dev.20230112 → 5.0.0-dev.20230113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +262 -242
- package/lib/tsserver.js +347 -257
- package/lib/tsserverlibrary.d.ts +11 -2
- package/lib/tsserverlibrary.js +347 -258
- package/lib/typescript.d.ts +11 -2
- package/lib/typescript.js +338 -258
- package/lib/typingsInstaller.js +99 -160
- package/package.json +5 -2
package/lib/typescript.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.20230113`;
|
|
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
|
}
|
|
@@ -37822,7 +37784,7 @@ ${lanes.join("\n")}
|
|
|
37822
37784
|
Debug.assert(extensionIsTS(resolved.extension));
|
|
37823
37785
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
37824
37786
|
}
|
|
37825
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
|
|
37787
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
|
|
37826
37788
|
if (resultFromCache) {
|
|
37827
37789
|
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
37828
37790
|
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
@@ -37840,7 +37802,8 @@ ${lanes.join("\n")}
|
|
|
37840
37802
|
},
|
|
37841
37803
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
37842
37804
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
37843
|
-
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
37805
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
|
37806
|
+
node10Result: legacyResult
|
|
37844
37807
|
};
|
|
37845
37808
|
}
|
|
37846
37809
|
function initializeResolutionField(value) {
|
|
@@ -38880,7 +38843,7 @@ ${lanes.join("\n")}
|
|
|
38880
38843
|
);
|
|
38881
38844
|
}
|
|
38882
38845
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
38883
|
-
var _a2, _b;
|
|
38846
|
+
var _a2, _b, _c, _d;
|
|
38884
38847
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
38885
38848
|
const failedLookupLocations = [];
|
|
38886
38849
|
const affectingLocations = [];
|
|
@@ -38907,44 +38870,60 @@ ${lanes.join("\n")}
|
|
|
38907
38870
|
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
|
|
38908
38871
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
38909
38872
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
38910
|
-
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
38873
|
+
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
38911
38874
|
} else {
|
|
38912
|
-
result = tryResolve(extensions);
|
|
38875
|
+
result = tryResolve(extensions, state);
|
|
38876
|
+
}
|
|
38877
|
+
let legacyResult;
|
|
38878
|
+
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) {
|
|
38879
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
38880
|
+
const diagnosticState = {
|
|
38881
|
+
...state,
|
|
38882
|
+
features: state.features & ~8 /* Exports */,
|
|
38883
|
+
failedLookupLocations: [],
|
|
38884
|
+
affectingLocations: [],
|
|
38885
|
+
reportDiagnostic: noop
|
|
38886
|
+
};
|
|
38887
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
38888
|
+
if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
|
|
38889
|
+
legacyResult = diagnosticResult.value.resolved.path;
|
|
38890
|
+
}
|
|
38913
38891
|
}
|
|
38914
38892
|
return createResolvedModuleWithFailedLookupLocations(
|
|
38915
|
-
(
|
|
38916
|
-
(
|
|
38893
|
+
(_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved,
|
|
38894
|
+
(_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport,
|
|
38917
38895
|
failedLookupLocations,
|
|
38918
38896
|
affectingLocations,
|
|
38919
38897
|
diagnostics,
|
|
38920
|
-
state.resultFromCache
|
|
38898
|
+
state.resultFromCache,
|
|
38899
|
+
legacyResult
|
|
38921
38900
|
);
|
|
38922
|
-
function tryResolve(extensions2) {
|
|
38923
|
-
const loader = (extensions3, candidate, onlyRecordFailures,
|
|
38901
|
+
function tryResolve(extensions2, state2) {
|
|
38902
|
+
const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
|
|
38924
38903
|
extensions3,
|
|
38925
38904
|
candidate,
|
|
38926
38905
|
onlyRecordFailures,
|
|
38927
|
-
|
|
38906
|
+
state3,
|
|
38928
38907
|
/*considerPackageJson*/
|
|
38929
38908
|
true
|
|
38930
38909
|
);
|
|
38931
|
-
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader,
|
|
38910
|
+
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);
|
|
38932
38911
|
if (resolved) {
|
|
38933
38912
|
return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
|
|
38934
38913
|
}
|
|
38935
38914
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
38936
38915
|
let resolved2;
|
|
38937
38916
|
if (features & 2 /* Imports */ && startsWith(moduleName, "#")) {
|
|
38938
|
-
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory,
|
|
38917
|
+
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38939
38918
|
}
|
|
38940
38919
|
if (!resolved2 && features & 4 /* SelfName */) {
|
|
38941
|
-
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory,
|
|
38920
|
+
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38942
38921
|
}
|
|
38943
38922
|
if (!resolved2) {
|
|
38944
38923
|
if (traceEnabled) {
|
|
38945
38924
|
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
38946
38925
|
}
|
|
38947
|
-
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory,
|
|
38926
|
+
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
38948
38927
|
}
|
|
38949
38928
|
if (!resolved2)
|
|
38950
38929
|
return void 0;
|
|
@@ -38963,7 +38942,7 @@ ${lanes.join("\n")}
|
|
|
38963
38942
|
candidate,
|
|
38964
38943
|
/*onlyRecordFailures*/
|
|
38965
38944
|
false,
|
|
38966
|
-
|
|
38945
|
+
state2,
|
|
38967
38946
|
/*considerPackageJson*/
|
|
38968
38947
|
true
|
|
38969
38948
|
);
|
|
@@ -40318,7 +40297,7 @@ ${lanes.join("\n")}
|
|
|
40318
40297
|
case 264 /* ModuleDeclaration */:
|
|
40319
40298
|
return getModuleInstanceState(node, visited);
|
|
40320
40299
|
case 79 /* Identifier */:
|
|
40321
|
-
if (node.
|
|
40300
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
40322
40301
|
return 0 /* NonInstantiated */;
|
|
40323
40302
|
}
|
|
40324
40303
|
}
|
|
@@ -40754,6 +40733,7 @@ ${lanes.join("\n")}
|
|
|
40754
40733
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
40755
40734
|
seenThisKeyword = false;
|
|
40756
40735
|
bindChildren(node);
|
|
40736
|
+
Debug.assertNotNode(node, isIdentifier);
|
|
40757
40737
|
node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */;
|
|
40758
40738
|
} else {
|
|
40759
40739
|
bindChildren(node);
|
|
@@ -41913,13 +41893,14 @@ ${lanes.join("\n")}
|
|
|
41913
41893
|
}
|
|
41914
41894
|
function checkContextualIdentifier(node) {
|
|
41915
41895
|
if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
|
|
41916
|
-
|
|
41896
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
41897
|
+
if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
|
|
41917
41898
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41918
41899
|
node,
|
|
41919
41900
|
getStrictModeIdentifierMessage(node),
|
|
41920
41901
|
declarationNameToString(node)
|
|
41921
41902
|
));
|
|
41922
|
-
} else if (
|
|
41903
|
+
} else if (originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
41923
41904
|
if (isExternalModule(file) && isInTopLevelContext(node)) {
|
|
41924
41905
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41925
41906
|
node,
|
|
@@ -41933,7 +41914,7 @@ ${lanes.join("\n")}
|
|
|
41933
41914
|
declarationNameToString(node)
|
|
41934
41915
|
));
|
|
41935
41916
|
}
|
|
41936
|
-
} else if (
|
|
41917
|
+
} else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
|
|
41937
41918
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
41938
41919
|
node,
|
|
41939
41920
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,
|
|
@@ -42145,7 +42126,7 @@ ${lanes.join("\n")}
|
|
|
42145
42126
|
function bindWorker(node) {
|
|
42146
42127
|
switch (node.kind) {
|
|
42147
42128
|
case 79 /* Identifier */:
|
|
42148
|
-
if (node.
|
|
42129
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
42149
42130
|
let parentNode = node.parent;
|
|
42150
42131
|
while (parentNode && !isJSDocTypeAlias(parentNode)) {
|
|
42151
42132
|
parentNode = parentNode.parent;
|
|
@@ -47116,6 +47097,8 @@ ${lanes.join("\n")}
|
|
|
47116
47097
|
/*isError*/
|
|
47117
47098
|
false,
|
|
47118
47099
|
errorNode,
|
|
47100
|
+
currentSourceFile,
|
|
47101
|
+
mode,
|
|
47119
47102
|
resolvedModule,
|
|
47120
47103
|
moduleReference
|
|
47121
47104
|
);
|
|
@@ -47201,6 +47184,8 @@ ${lanes.join("\n")}
|
|
|
47201
47184
|
/*isError*/
|
|
47202
47185
|
noImplicitAny && !!moduleNotFoundError,
|
|
47203
47186
|
errorNode,
|
|
47187
|
+
currentSourceFile,
|
|
47188
|
+
mode,
|
|
47204
47189
|
resolvedModule,
|
|
47205
47190
|
moduleReference
|
|
47206
47191
|
);
|
|
@@ -47255,26 +47240,37 @@ ${lanes.join("\n")}
|
|
|
47255
47240
|
return importSourceWithoutExtension;
|
|
47256
47241
|
}
|
|
47257
47242
|
}
|
|
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
|
-
|
|
47243
|
+
function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {
|
|
47244
|
+
var _a2, _b;
|
|
47245
|
+
let errorInfo;
|
|
47246
|
+
if (!isExternalModuleNameRelative(moduleReference) && packageId) {
|
|
47247
|
+
const node10Result = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleReference, mode)) == null ? void 0 : _b.node10Result;
|
|
47248
|
+
errorInfo = node10Result ? chainDiagnosticMessages(
|
|
47249
|
+
/*details*/
|
|
47250
|
+
void 0,
|
|
47251
|
+
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,
|
|
47252
|
+
node10Result,
|
|
47253
|
+
node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name
|
|
47254
|
+
) : typesPackageExists(packageId.name) ? chainDiagnosticMessages(
|
|
47255
|
+
/*details*/
|
|
47256
|
+
void 0,
|
|
47257
|
+
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,
|
|
47258
|
+
packageId.name,
|
|
47259
|
+
mangleScopedPackageName(packageId.name)
|
|
47260
|
+
) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
|
|
47261
|
+
/*details*/
|
|
47262
|
+
void 0,
|
|
47263
|
+
Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
|
|
47264
|
+
packageId.name,
|
|
47265
|
+
moduleReference
|
|
47266
|
+
) : chainDiagnosticMessages(
|
|
47267
|
+
/*details*/
|
|
47268
|
+
void 0,
|
|
47269
|
+
Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
|
47270
|
+
moduleReference,
|
|
47271
|
+
mangleScopedPackageName(packageId.name)
|
|
47272
|
+
);
|
|
47273
|
+
}
|
|
47278
47274
|
errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
|
|
47279
47275
|
errorInfo,
|
|
47280
47276
|
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
|
@@ -48931,13 +48927,17 @@ ${lanes.join("\n")}
|
|
|
48931
48927
|
let qualifier = root.qualifier;
|
|
48932
48928
|
if (qualifier) {
|
|
48933
48929
|
if (isIdentifier(qualifier)) {
|
|
48934
|
-
|
|
48930
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier)) {
|
|
48931
|
+
qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);
|
|
48932
|
+
}
|
|
48935
48933
|
} else {
|
|
48936
|
-
|
|
48937
|
-
qualifier
|
|
48938
|
-
|
|
48939
|
-
|
|
48940
|
-
|
|
48934
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {
|
|
48935
|
+
qualifier = factory.updateQualifiedName(
|
|
48936
|
+
qualifier,
|
|
48937
|
+
qualifier.left,
|
|
48938
|
+
setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)
|
|
48939
|
+
);
|
|
48940
|
+
}
|
|
48941
48941
|
}
|
|
48942
48942
|
}
|
|
48943
48943
|
typeArguments = ref.typeArguments;
|
|
@@ -48957,13 +48957,17 @@ ${lanes.join("\n")}
|
|
|
48957
48957
|
let typeArguments = root.typeArguments;
|
|
48958
48958
|
let typeName = root.typeName;
|
|
48959
48959
|
if (isIdentifier(typeName)) {
|
|
48960
|
-
|
|
48960
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName)) {
|
|
48961
|
+
typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);
|
|
48962
|
+
}
|
|
48961
48963
|
} else {
|
|
48962
|
-
|
|
48963
|
-
typeName
|
|
48964
|
-
|
|
48965
|
-
|
|
48966
|
-
|
|
48964
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {
|
|
48965
|
+
typeName = factory.updateQualifiedName(
|
|
48966
|
+
typeName,
|
|
48967
|
+
typeName.left,
|
|
48968
|
+
setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)
|
|
48969
|
+
);
|
|
48970
|
+
}
|
|
48967
48971
|
}
|
|
48968
48972
|
typeArguments = ref.typeArguments;
|
|
48969
48973
|
const ids = getAccessStack(ref);
|
|
@@ -49677,7 +49681,11 @@ ${lanes.join("\n")}
|
|
|
49677
49681
|
if (!nonRootParts || isEntityName(nonRootParts)) {
|
|
49678
49682
|
if (nonRootParts) {
|
|
49679
49683
|
const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
49680
|
-
|
|
49684
|
+
setIdentifierTypeArguments(
|
|
49685
|
+
lastId,
|
|
49686
|
+
/*typeArguments*/
|
|
49687
|
+
void 0
|
|
49688
|
+
);
|
|
49681
49689
|
}
|
|
49682
49690
|
return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
49683
49691
|
} else {
|
|
@@ -49694,8 +49702,12 @@ ${lanes.join("\n")}
|
|
|
49694
49702
|
return factory.createTypeQueryNode(entityName);
|
|
49695
49703
|
} else {
|
|
49696
49704
|
const lastId = isIdentifier(entityName) ? entityName : entityName.right;
|
|
49697
|
-
const lastTypeArgs = lastId
|
|
49698
|
-
|
|
49705
|
+
const lastTypeArgs = getIdentifierTypeArguments(lastId);
|
|
49706
|
+
setIdentifierTypeArguments(
|
|
49707
|
+
lastId,
|
|
49708
|
+
/*typeArguments*/
|
|
49709
|
+
void 0
|
|
49710
|
+
);
|
|
49699
49711
|
return factory.createTypeReferenceNode(entityName, lastTypeArgs);
|
|
49700
49712
|
}
|
|
49701
49713
|
function createAccessFromSymbolChain(chain2, index, stopper) {
|
|
@@ -49739,7 +49751,9 @@ ${lanes.join("\n")}
|
|
|
49739
49751
|
return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
|
|
49740
49752
|
}
|
|
49741
49753
|
}
|
|
49742
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49754
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49755
|
+
if (typeParameterNodes)
|
|
49756
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49743
49757
|
identifier.symbol = symbol2;
|
|
49744
49758
|
if (index > stopper) {
|
|
49745
49759
|
const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);
|
|
@@ -49797,7 +49811,9 @@ ${lanes.join("\n")}
|
|
|
49797
49811
|
text = `${rawtext}_${i}`;
|
|
49798
49812
|
}
|
|
49799
49813
|
if (text !== rawtext) {
|
|
49800
|
-
|
|
49814
|
+
const typeArguments = getIdentifierTypeArguments(result);
|
|
49815
|
+
result = factory.createIdentifier(text);
|
|
49816
|
+
setIdentifierTypeArguments(result, typeArguments);
|
|
49801
49817
|
}
|
|
49802
49818
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
49803
49819
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
@@ -49821,7 +49837,9 @@ ${lanes.join("\n")}
|
|
|
49821
49837
|
if (index === 0) {
|
|
49822
49838
|
context.flags ^= 16777216 /* InInitialEntityName */;
|
|
49823
49839
|
}
|
|
49824
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49840
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49841
|
+
if (typeParameterNodes)
|
|
49842
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49825
49843
|
identifier.symbol = symbol2;
|
|
49826
49844
|
return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
49827
49845
|
}
|
|
@@ -49844,7 +49862,9 @@ ${lanes.join("\n")}
|
|
|
49844
49862
|
return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
|
|
49845
49863
|
}
|
|
49846
49864
|
if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
49847
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
49865
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49866
|
+
if (typeParameterNodes)
|
|
49867
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49848
49868
|
identifier.symbol = symbol2;
|
|
49849
49869
|
return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
49850
49870
|
} else {
|
|
@@ -49859,8 +49879,11 @@ ${lanes.join("\n")}
|
|
|
49859
49879
|
expression = factory.createNumericLiteral(+symbolName2);
|
|
49860
49880
|
}
|
|
49861
49881
|
if (!expression) {
|
|
49862
|
-
|
|
49863
|
-
|
|
49882
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
49883
|
+
if (typeParameterNodes)
|
|
49884
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
49885
|
+
identifier.symbol = symbol2;
|
|
49886
|
+
expression = identifier;
|
|
49864
49887
|
}
|
|
49865
49888
|
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);
|
|
49866
49889
|
}
|
|
@@ -63375,19 +63398,22 @@ ${lanes.join("\n")}
|
|
|
63375
63398
|
break;
|
|
63376
63399
|
case 166 /* Parameter */:
|
|
63377
63400
|
const param = declaration;
|
|
63378
|
-
if (isIdentifier(param.name)
|
|
63379
|
-
param
|
|
63380
|
-
param.
|
|
63381
|
-
|
|
63382
|
-
|
|
63383
|
-
|
|
63384
|
-
|
|
63385
|
-
|
|
63386
|
-
|
|
63387
|
-
|
|
63388
|
-
|
|
63389
|
-
|
|
63390
|
-
|
|
63401
|
+
if (isIdentifier(param.name)) {
|
|
63402
|
+
const originalKeywordKind = identifierToKeywordKind(param.name);
|
|
63403
|
+
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
|
|
63404
|
+
param,
|
|
63405
|
+
param.name.escapedText,
|
|
63406
|
+
788968 /* Type */,
|
|
63407
|
+
void 0,
|
|
63408
|
+
param.name.escapedText,
|
|
63409
|
+
/*isUse*/
|
|
63410
|
+
true
|
|
63411
|
+
) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {
|
|
63412
|
+
const newName = "arg" + param.parent.parameters.indexOf(param);
|
|
63413
|
+
const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
63414
|
+
errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
63415
|
+
return;
|
|
63416
|
+
}
|
|
63391
63417
|
}
|
|
63392
63418
|
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
63419
|
break;
|
|
@@ -63575,6 +63601,10 @@ ${lanes.join("\n")}
|
|
|
63575
63601
|
function isTypeParameterAtTopLevel(type, typeParameter) {
|
|
63576
63602
|
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
63603
|
}
|
|
63604
|
+
function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {
|
|
63605
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
63606
|
+
return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);
|
|
63607
|
+
}
|
|
63578
63608
|
function createEmptyObjectTypeFromStringLiteral(type) {
|
|
63579
63609
|
const members = createSymbolTable();
|
|
63580
63610
|
forEachType(type, (t) => {
|
|
@@ -64446,7 +64476,7 @@ ${lanes.join("\n")}
|
|
|
64446
64476
|
function getCovariantInference(inference, signature) {
|
|
64447
64477
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
64448
64478
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
64449
|
-
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !
|
|
64479
|
+
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
64450
64480
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
64451
64481
|
const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
64452
64482
|
return getWidenedType(unwidenedType);
|
|
@@ -75175,8 +75205,11 @@ ${lanes.join("\n")}
|
|
|
75175
75205
|
}
|
|
75176
75206
|
function checkTypeReferenceNode(node) {
|
|
75177
75207
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
75178
|
-
if (node.kind === 180 /* TypeReference */ &&
|
|
75179
|
-
|
|
75208
|
+
if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
75209
|
+
const sourceFile = getSourceFileOfNode(node);
|
|
75210
|
+
if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) {
|
|
75211
|
+
grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
|
|
75212
|
+
}
|
|
75180
75213
|
}
|
|
75181
75214
|
forEach(node.typeArguments, checkSourceElement);
|
|
75182
75215
|
const type = getTypeFromTypeReference(node);
|
|
@@ -80785,8 +80818,9 @@ ${lanes.join("\n")}
|
|
|
80785
80818
|
}
|
|
80786
80819
|
}
|
|
80787
80820
|
function getReferencedImportDeclaration(nodeIn) {
|
|
80788
|
-
|
|
80789
|
-
|
|
80821
|
+
const specifier = getIdentifierGeneratedImportReference(nodeIn);
|
|
80822
|
+
if (specifier) {
|
|
80823
|
+
return specifier;
|
|
80790
80824
|
}
|
|
80791
80825
|
const node = getParseTreeNode(nodeIn, isIdentifier);
|
|
80792
80826
|
if (node) {
|
|
@@ -82764,7 +82798,7 @@ ${lanes.join("\n")}
|
|
|
82764
82798
|
}
|
|
82765
82799
|
function checkGrammarNameInLetOrConstDeclarations(name) {
|
|
82766
82800
|
if (name.kind === 79 /* Identifier */) {
|
|
82767
|
-
if (name.
|
|
82801
|
+
if (name.escapedText === "let") {
|
|
82768
82802
|
return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
|
|
82769
82803
|
}
|
|
82770
82804
|
} else {
|
|
@@ -83710,12 +83744,6 @@ ${lanes.join("\n")}
|
|
|
83710
83744
|
"use strict";
|
|
83711
83745
|
init_ts2();
|
|
83712
83746
|
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
83747
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
83720
83748
|
return context.factory.updateQualifiedName(
|
|
83721
83749
|
node,
|
|
@@ -88955,7 +88983,7 @@ ${lanes.join("\n")}
|
|
|
88955
88983
|
if (isClassWithConstructorReference) {
|
|
88956
88984
|
enableSubstitutionForClassAliases();
|
|
88957
88985
|
const alias = factory2.cloneNode(temp);
|
|
88958
|
-
alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
88986
|
+
alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
88959
88987
|
classAliases[getOriginalNodeId(node)] = alias;
|
|
88960
88988
|
}
|
|
88961
88989
|
setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
|
|
@@ -93152,7 +93180,7 @@ ${lanes.join("\n")}
|
|
|
93152
93180
|
factory2.createIdentifier(name),
|
|
93153
93181
|
generatedName
|
|
93154
93182
|
);
|
|
93155
|
-
generatedName
|
|
93183
|
+
setIdentifierGeneratedImportReference(generatedName, specifier);
|
|
93156
93184
|
specifierSourceImports.set(name, specifier);
|
|
93157
93185
|
return generatedName;
|
|
93158
93186
|
}
|
|
@@ -94308,7 +94336,7 @@ ${lanes.join("\n")}
|
|
|
94308
94336
|
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
|
|
94309
94337
|
}
|
|
94310
94338
|
}
|
|
94311
|
-
if (node.
|
|
94339
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
94312
94340
|
return setOriginalNode(setTextRange(
|
|
94313
94341
|
factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),
|
|
94314
94342
|
node
|
|
@@ -97195,7 +97223,7 @@ ${lanes.join("\n")}
|
|
|
97195
97223
|
return node;
|
|
97196
97224
|
}
|
|
97197
97225
|
function trySubstituteReservedName(name) {
|
|
97198
|
-
const token =
|
|
97226
|
+
const token = identifierToKeywordKind(name);
|
|
97199
97227
|
if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) {
|
|
97200
97228
|
return setTextRange(factory2.createStringLiteralFromNode(name), name);
|
|
97201
97229
|
}
|
|
@@ -100875,7 +100903,7 @@ ${lanes.join("\n")}
|
|
|
100875
100903
|
return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
|
|
100876
100904
|
}
|
|
100877
100905
|
return node;
|
|
100878
|
-
} else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
100906
|
+
} else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
100879
100907
|
const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
|
|
100880
100908
|
if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
|
|
100881
100909
|
return setTextRange(
|
|
@@ -106842,7 +106870,7 @@ ${lanes.join("\n")}
|
|
|
106842
106870
|
/*includeTrivia*/
|
|
106843
106871
|
false
|
|
106844
106872
|
), node.symbol);
|
|
106845
|
-
emitList(node, node
|
|
106873
|
+
emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);
|
|
106846
106874
|
}
|
|
106847
106875
|
function emitPrivateIdentifier(node) {
|
|
106848
106876
|
write(getTextOfNode2(
|
|
@@ -109560,10 +109588,11 @@ ${lanes.join("\n")}
|
|
|
109560
109588
|
}
|
|
109561
109589
|
}
|
|
109562
109590
|
function generateName(name) {
|
|
109563
|
-
|
|
109564
|
-
|
|
109591
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
109592
|
+
if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
|
|
109593
|
+
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);
|
|
109565
109594
|
} else {
|
|
109566
|
-
const autoGenerateId =
|
|
109595
|
+
const autoGenerateId = autoGenerate.id;
|
|
109567
109596
|
return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
|
|
109568
109597
|
}
|
|
109569
109598
|
}
|
|
@@ -109843,16 +109872,17 @@ ${lanes.join("\n")}
|
|
|
109843
109872
|
}
|
|
109844
109873
|
}
|
|
109845
109874
|
function makeName(name) {
|
|
109846
|
-
const
|
|
109847
|
-
const
|
|
109848
|
-
|
|
109875
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
109876
|
+
const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);
|
|
109877
|
+
const suffix = formatGeneratedNamePart(autoGenerate.suffix);
|
|
109878
|
+
switch (autoGenerate.flags & 7 /* KindMask */) {
|
|
109849
109879
|
case 1 /* Auto */:
|
|
109850
|
-
return makeTempVariableName(TempFlags.Auto, !!(
|
|
109880
|
+
return makeTempVariableName(TempFlags.Auto, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
|
|
109851
109881
|
case 2 /* Loop */:
|
|
109852
109882
|
Debug.assertNode(name, isIdentifier);
|
|
109853
109883
|
return makeTempVariableName(
|
|
109854
109884
|
TempFlags._i,
|
|
109855
|
-
!!(
|
|
109885
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
109856
109886
|
/*privateName*/
|
|
109857
109887
|
false,
|
|
109858
109888
|
prefix,
|
|
@@ -109861,16 +109891,16 @@ ${lanes.join("\n")}
|
|
|
109861
109891
|
case 3 /* Unique */:
|
|
109862
109892
|
return makeUniqueName2(
|
|
109863
109893
|
idText(name),
|
|
109864
|
-
|
|
109865
|
-
!!(
|
|
109866
|
-
!!(
|
|
109894
|
+
autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
|
|
109895
|
+
!!(autoGenerate.flags & 16 /* Optimistic */),
|
|
109896
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
109867
109897
|
isPrivateIdentifier(name),
|
|
109868
109898
|
prefix,
|
|
109869
109899
|
suffix
|
|
109870
109900
|
);
|
|
109871
109901
|
}
|
|
109872
109902
|
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(
|
|
109873
|
-
|
|
109903
|
+
autoGenerate.flags & 7 /* KindMask */,
|
|
109874
109904
|
GeneratedIdentifierFlags,
|
|
109875
109905
|
/*isFlags*/
|
|
109876
109906
|
true
|
|
@@ -134638,8 +134668,8 @@ ${lanes.join("\n")}
|
|
|
134638
134668
|
function collectExportRenames(sourceFile, checker, identifiers) {
|
|
134639
134669
|
const res = /* @__PURE__ */ new Map();
|
|
134640
134670
|
forEachExportReference(sourceFile, (node) => {
|
|
134641
|
-
const { text
|
|
134642
|
-
if (!res.has(text) && (
|
|
134671
|
+
const { text } = node.name;
|
|
134672
|
+
if (!res.has(text) && (isIdentifierANonContextualKeyword(node.name) || checker.resolveName(
|
|
134643
134673
|
text,
|
|
134644
134674
|
node,
|
|
134645
134675
|
111551 /* Value */,
|
|
@@ -143761,8 +143791,11 @@ ${lanes.join("\n")}
|
|
|
143761
143791
|
if (isModifier(node)) {
|
|
143762
143792
|
return node.kind;
|
|
143763
143793
|
}
|
|
143764
|
-
if (isIdentifier(node)
|
|
143765
|
-
|
|
143794
|
+
if (isIdentifier(node)) {
|
|
143795
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
143796
|
+
if (originalKeywordKind && isModifierKind(originalKeywordKind)) {
|
|
143797
|
+
return originalKeywordKind;
|
|
143798
|
+
}
|
|
143766
143799
|
}
|
|
143767
143800
|
return void 0;
|
|
143768
143801
|
}
|
|
@@ -145931,7 +145964,8 @@ ${lanes.join("\n")}
|
|
|
145931
145964
|
return kind === 132 /* AsyncKeyword */ || kind === 133 /* AwaitKeyword */ || kind === 128 /* AsKeyword */ || kind === 150 /* SatisfiesKeyword */ || kind === 154 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind);
|
|
145932
145965
|
}
|
|
145933
145966
|
function keywordForNode(node) {
|
|
145934
|
-
|
|
145967
|
+
var _a2;
|
|
145968
|
+
return isIdentifier(node) ? (_a2 = identifierToKeywordKind(node)) != null ? _a2 : 0 /* Unknown */ : node.kind;
|
|
145935
145969
|
}
|
|
145936
145970
|
function getContextualKeywords(contextToken, position) {
|
|
145937
145971
|
const entries = [];
|
|
@@ -145977,6 +146011,7 @@ ${lanes.join("\n")}
|
|
|
145977
146011
|
return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined");
|
|
145978
146012
|
}
|
|
145979
146013
|
function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) {
|
|
146014
|
+
var _a2;
|
|
145980
146015
|
switch (location.kind) {
|
|
145981
146016
|
case 353 /* SyntaxList */:
|
|
145982
146017
|
return tryCast(location.parent, isObjectTypeDeclaration);
|
|
@@ -145987,8 +146022,8 @@ ${lanes.join("\n")}
|
|
|
145987
146022
|
}
|
|
145988
146023
|
break;
|
|
145989
146024
|
case 79 /* Identifier */: {
|
|
145990
|
-
const originalKeywordKind = location
|
|
145991
|
-
if (originalKeywordKind
|
|
146025
|
+
const originalKeywordKind = identifierToKeywordKind(location);
|
|
146026
|
+
if (originalKeywordKind) {
|
|
145992
146027
|
return void 0;
|
|
145993
146028
|
}
|
|
145994
146029
|
if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) {
|
|
@@ -146021,7 +146056,7 @@ ${lanes.join("\n")}
|
|
|
146021
146056
|
return void 0;
|
|
146022
146057
|
}
|
|
146023
146058
|
const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword;
|
|
146024
|
-
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword(
|
|
146059
|
+
return isValidKeyword(contextToken.kind) || contextToken.kind === 41 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword((_a2 = identifierToKeywordKind(contextToken)) != null ? _a2 : 0 /* Unknown */) ? contextToken.parent.parent : void 0;
|
|
146025
146060
|
}
|
|
146026
146061
|
}
|
|
146027
146062
|
function tryGetTypeLiteralNode(node) {
|
|
@@ -149066,7 +149101,7 @@ ${lanes.join("\n")}
|
|
|
149066
149101
|
}
|
|
149067
149102
|
}
|
|
149068
149103
|
if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) {
|
|
149069
|
-
const isDefaultExport = referenceLocation.
|
|
149104
|
+
const isDefaultExport = referenceLocation.escapedText === "default" || exportSpecifier.name.escapedText === "default";
|
|
149070
149105
|
const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */;
|
|
149071
149106
|
const exportSymbol = Debug.checkDefined(exportSpecifier.symbol);
|
|
149072
149107
|
const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker);
|
|
@@ -155945,7 +155980,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
155945
155980
|
111551 /* Value */,
|
|
155946
155981
|
/*excludeGlobals*/
|
|
155947
155982
|
false
|
|
155948
|
-
) && !isPrivateIdentifier(node.name) && !
|
|
155983
|
+
) && !isPrivateIdentifier(node.name) && !identifierToKeywordKind(node.name) ? node.name.text : getUniqueName(isClassLike(scope) ? "newProperty" : "newLocal", file);
|
|
155949
155984
|
const isJS = isInJSFile(scope);
|
|
155950
155985
|
let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */);
|
|
155951
155986
|
let initializer = transformConstantInitializer(skipParentheses(node), substitutions);
|
|
@@ -156960,7 +156995,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
156960
156995
|
if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) {
|
|
156961
156996
|
return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);
|
|
156962
156997
|
}
|
|
156963
|
-
if (isIdentifier(node) && node.
|
|
156998
|
+
if (isIdentifier(node) && node.escapedText === "default" && symbol.parent && symbol.parent.flags & 1536 /* Module */) {
|
|
156964
156999
|
return void 0;
|
|
156965
157000
|
}
|
|
156966
157001
|
if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) {
|
|
@@ -158665,7 +158700,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158665
158700
|
}
|
|
158666
158701
|
const jsDocNode = parent2.parent.kind === 169 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent;
|
|
158667
158702
|
jsDocNode.jsDoc = parent2.jsDoc;
|
|
158668
|
-
jsDocNode.jsDocCache = parent2.jsDocCache;
|
|
158669
158703
|
return jsDocNode;
|
|
158670
158704
|
}
|
|
158671
158705
|
function tryMergeJsdocTags(oldTag, newTag) {
|
|
@@ -162717,7 +162751,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
162717
162751
|
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
162718
162752
|
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
162719
162753
|
const since = typeof options.since === "string" ? new Version(options.since) : (_b = options.since) != null ? _b : warnAfter;
|
|
162720
|
-
const error = options.error || errorAfter && version2.compareTo(errorAfter)
|
|
162754
|
+
const error = options.error || errorAfter && version2.compareTo(errorAfter) >= 0;
|
|
162721
162755
|
const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;
|
|
162722
162756
|
return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
162723
162757
|
}
|
|
@@ -163115,8 +163149,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
163115
163149
|
createIdentifier = deprecate(function createIdentifier2(text) {
|
|
163116
163150
|
return factory.createIdentifier(
|
|
163117
163151
|
text,
|
|
163118
|
-
/*typeArguments*/
|
|
163119
|
-
void 0,
|
|
163120
163152
|
/*originalKeywordKind*/
|
|
163121
163153
|
void 0
|
|
163122
163154
|
);
|
|
@@ -164112,6 +164144,44 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164112
164144
|
}
|
|
164113
164145
|
});
|
|
164114
164146
|
|
|
164147
|
+
// src/deprecatedCompat/5.0/identifierProperties.ts
|
|
164148
|
+
var init_identifierProperties = __esm({
|
|
164149
|
+
"src/deprecatedCompat/5.0/identifierProperties.ts"() {
|
|
164150
|
+
"use strict";
|
|
164151
|
+
init_ts5();
|
|
164152
|
+
init_deprecate();
|
|
164153
|
+
addObjectAllocatorPatcher((objectAllocator2) => {
|
|
164154
|
+
const Identifier75 = objectAllocator2.getIdentifierConstructor();
|
|
164155
|
+
if (!hasProperty(Identifier75.prototype, "originalKeywordKind")) {
|
|
164156
|
+
Object.defineProperty(Identifier75.prototype, "originalKeywordKind", {
|
|
164157
|
+
get: deprecate(function() {
|
|
164158
|
+
return identifierToKeywordKind(this);
|
|
164159
|
+
}, {
|
|
164160
|
+
name: "originalKeywordKind",
|
|
164161
|
+
since: "5.0",
|
|
164162
|
+
warnAfter: "5.1",
|
|
164163
|
+
errorAfter: "5.2",
|
|
164164
|
+
message: "Use 'identifierToKeywordKind(identifier)' instead."
|
|
164165
|
+
})
|
|
164166
|
+
});
|
|
164167
|
+
}
|
|
164168
|
+
if (!hasProperty(Identifier75.prototype, "isInJSDocNamespace")) {
|
|
164169
|
+
Object.defineProperty(Identifier75.prototype, "isInJSDocNamespace", {
|
|
164170
|
+
get: deprecate(function() {
|
|
164171
|
+
return this.flags & 2048 /* IdentifierIsInJSDocNamespace */ ? true : void 0;
|
|
164172
|
+
}, {
|
|
164173
|
+
name: "isInJSDocNamespace",
|
|
164174
|
+
since: "5.0",
|
|
164175
|
+
warnAfter: "5.1",
|
|
164176
|
+
errorAfter: "5.2",
|
|
164177
|
+
message: "Use '.parent' or the surrounding context to determine this instead."
|
|
164178
|
+
})
|
|
164179
|
+
});
|
|
164180
|
+
}
|
|
164181
|
+
});
|
|
164182
|
+
}
|
|
164183
|
+
});
|
|
164184
|
+
|
|
164115
164185
|
// src/deprecatedCompat/_namespaces/ts.ts
|
|
164116
164186
|
var init_ts5 = __esm({
|
|
164117
164187
|
"src/deprecatedCompat/_namespaces/ts.ts"() {
|
|
@@ -164125,6 +164195,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164125
164195
|
init_importTypeAssertions();
|
|
164126
164196
|
init_typeParameterModifiers();
|
|
164127
164197
|
init_mergeDecoratorsAndModifiers();
|
|
164198
|
+
init_identifierProperties();
|
|
164128
164199
|
}
|
|
164129
164200
|
});
|
|
164130
164201
|
|
|
@@ -164289,6 +164360,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
164289
164360
|
addEmitHelper: () => addEmitHelper,
|
|
164290
164361
|
addEmitHelpers: () => addEmitHelpers,
|
|
164291
164362
|
addNodeFactoryPatcher: () => addNodeFactoryPatcher,
|
|
164363
|
+
addObjectAllocatorPatcher: () => addObjectAllocatorPatcher,
|
|
164292
164364
|
addRange: () => addRange,
|
|
164293
164365
|
addRelatedInfo: () => addRelatedInfo,
|
|
164294
164366
|
addSyntheticLeadingComment: () => addSyntheticLeadingComment,
|
|
@@ -165057,6 +165129,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
165057
165129
|
getGeneratedNameForNode: () => getGeneratedNameForNode,
|
|
165058
165130
|
getHeritageClause: () => getHeritageClause,
|
|
165059
165131
|
getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc,
|
|
165132
|
+
getIdentifierAutoGenerate: () => getIdentifierAutoGenerate,
|
|
165133
|
+
getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference,
|
|
165134
|
+
getIdentifierTypeArguments: () => getIdentifierTypeArguments,
|
|
165060
165135
|
getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression,
|
|
165061
165136
|
getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile,
|
|
165062
165137
|
getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker,
|
|
@@ -165390,6 +165465,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
165390
165465
|
hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames,
|
|
165391
165466
|
idText: () => idText,
|
|
165392
165467
|
identifierIsThisKeyword: () => identifierIsThisKeyword,
|
|
165468
|
+
identifierToKeywordKind: () => identifierToKeywordKind,
|
|
165393
165469
|
identity: () => identity,
|
|
165394
165470
|
identitySourceMapConsumer: () => identitySourceMapConsumer,
|
|
165395
165471
|
ignoreSourceNewlines: () => ignoreSourceNewlines,
|
|
@@ -166279,6 +166355,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
166279
166355
|
sameMap: () => sameMap,
|
|
166280
166356
|
sameMapping: () => sameMapping,
|
|
166281
166357
|
scanShebangTrivia: () => scanShebangTrivia,
|
|
166358
|
+
scanTokenAtPosition: () => scanTokenAtPosition,
|
|
166282
166359
|
scanner: () => scanner,
|
|
166283
166360
|
screenStartingMessageCodes: () => screenStartingMessageCodes,
|
|
166284
166361
|
semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations,
|
|
@@ -166291,6 +166368,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
166291
166368
|
setEachParent: () => setEachParent,
|
|
166292
166369
|
setEmitFlags: () => setEmitFlags,
|
|
166293
166370
|
setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned,
|
|
166371
|
+
setIdentifierAutoGenerate: () => setIdentifierAutoGenerate,
|
|
166372
|
+
setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference,
|
|
166373
|
+
setIdentifierTypeArguments: () => setIdentifierTypeArguments,
|
|
166294
166374
|
setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages,
|
|
166295
166375
|
setModuleDefaultHelper: () => setModuleDefaultHelper,
|
|
166296
166376
|
setNodeFlags: () => setNodeFlags,
|