typescript 5.0.0-dev.20230112 → 5.0.0-dev.20230114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es2023.array.d.ts +344 -0
- package/lib/lib.es2023.d.ts +22 -0
- package/lib/lib.es2023.full.d.ts +25 -0
- package/lib/lib.esnext.d.ts +1 -1
- package/lib/tsc.js +271 -246
- package/lib/tsserver.js +360 -265
- package/lib/tsserverlibrary.d.ts +11 -2
- package/lib/tsserverlibrary.js +360 -266
- package/lib/typescript.d.ts +11 -2
- package/lib/typescript.js +351 -266
- package/lib/typingsInstaller.js +102 -161
- package/package.json +5 -2
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20230114`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -3525,6 +3525,8 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {
|
|
|
3525
3525
|
NodeFlags3[NodeFlags3["ContextFlags"] = 50720768] = "ContextFlags";
|
|
3526
3526
|
NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 40960] = "TypeExcludesFlags";
|
|
3527
3527
|
NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 6291456] = "PermanentlySetIncrementalFlags";
|
|
3528
|
+
NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 128 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape";
|
|
3529
|
+
NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 2048 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace";
|
|
3528
3530
|
return NodeFlags3;
|
|
3529
3531
|
})(NodeFlags || {});
|
|
3530
3532
|
var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
@@ -7145,6 +7147,8 @@ var Diagnostics = {
|
|
|
7145
7147
|
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."),
|
|
7146
7148
|
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}'"),
|
|
7147
7149
|
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}'."),
|
|
7150
|
+
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."),
|
|
7151
|
+
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.`),
|
|
7148
7152
|
Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"),
|
|
7149
7153
|
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."),
|
|
7150
7154
|
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}'."),
|
|
@@ -10108,6 +10112,10 @@ function unescapeLeadingUnderscores(identifier) {
|
|
|
10108
10112
|
function idText(identifierOrPrivateName) {
|
|
10109
10113
|
return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText);
|
|
10110
10114
|
}
|
|
10115
|
+
function identifierToKeywordKind(node) {
|
|
10116
|
+
const token = stringToToken(node.escapedText);
|
|
10117
|
+
return token ? tryCast(token, isKeyword) : void 0;
|
|
10118
|
+
}
|
|
10111
10119
|
function symbolName(symbol) {
|
|
10112
10120
|
if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {
|
|
10113
10121
|
return idText(symbol.valueDeclaration.name);
|
|
@@ -10400,15 +10408,17 @@ function getJSDocReturnType(node) {
|
|
|
10400
10408
|
}
|
|
10401
10409
|
}
|
|
10402
10410
|
function getJSDocTagsWorker(node, noCache) {
|
|
10411
|
+
var _a2, _b;
|
|
10403
10412
|
if (!canHaveJSDoc(node))
|
|
10404
10413
|
return emptyArray;
|
|
10405
|
-
let tags = node.jsDocCache;
|
|
10414
|
+
let tags = (_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache;
|
|
10406
10415
|
if (tags === void 0 || noCache) {
|
|
10407
10416
|
const comments = getJSDocCommentsAndTags(node, noCache);
|
|
10408
10417
|
Debug.assert(comments.length < 2 || comments[0] !== comments[1]);
|
|
10409
10418
|
tags = flatMap(comments, (j) => isJSDoc(j) ? j.tags : j);
|
|
10410
10419
|
if (!noCache) {
|
|
10411
|
-
node.
|
|
10420
|
+
(_b = node.jsDoc) != null ? _b : node.jsDoc = [];
|
|
10421
|
+
node.jsDoc.jsDocCache = tags;
|
|
10412
10422
|
}
|
|
10413
10423
|
}
|
|
10414
10424
|
return tags;
|
|
@@ -10585,10 +10595,12 @@ function isAssertionKey(node) {
|
|
|
10585
10595
|
return isStringLiteral(node) || isIdentifier(node);
|
|
10586
10596
|
}
|
|
10587
10597
|
function isGeneratedIdentifier(node) {
|
|
10588
|
-
|
|
10598
|
+
var _a2;
|
|
10599
|
+
return isIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
|
|
10589
10600
|
}
|
|
10590
10601
|
function isGeneratedPrivateIdentifier(node) {
|
|
10591
|
-
|
|
10602
|
+
var _a2;
|
|
10603
|
+
return isPrivateIdentifier(node) && ((_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate) !== void 0;
|
|
10592
10604
|
}
|
|
10593
10605
|
function isPrivateIdentifierClassElementDeclaration(node) {
|
|
10594
10606
|
return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name);
|
|
@@ -11832,10 +11844,11 @@ function isComputedNonLiteralName(name) {
|
|
|
11832
11844
|
return name.kind === 164 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression);
|
|
11833
11845
|
}
|
|
11834
11846
|
function tryGetTextOfPropertyName(name) {
|
|
11847
|
+
var _a2;
|
|
11835
11848
|
switch (name.kind) {
|
|
11836
11849
|
case 79 /* Identifier */:
|
|
11837
11850
|
case 80 /* PrivateIdentifier */:
|
|
11838
|
-
return name.autoGenerate ? void 0 : name.escapedText;
|
|
11851
|
+
return ((_a2 = name.emitNode) == null ? void 0 : _a2.autoGenerate) ? void 0 : name.escapedText;
|
|
11839
11852
|
case 10 /* StringLiteral */:
|
|
11840
11853
|
case 8 /* NumericLiteral */:
|
|
11841
11854
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
@@ -11953,6 +11966,20 @@ function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
|
11953
11966
|
const start = scanner.getTokenPos();
|
|
11954
11967
|
return createTextSpanFromBounds(start, scanner.getTextPos());
|
|
11955
11968
|
}
|
|
11969
|
+
function scanTokenAtPosition(sourceFile, pos) {
|
|
11970
|
+
const scanner = createScanner(
|
|
11971
|
+
sourceFile.languageVersion,
|
|
11972
|
+
/*skipTrivia*/
|
|
11973
|
+
true,
|
|
11974
|
+
sourceFile.languageVariant,
|
|
11975
|
+
sourceFile.text,
|
|
11976
|
+
/*onError:*/
|
|
11977
|
+
void 0,
|
|
11978
|
+
pos
|
|
11979
|
+
);
|
|
11980
|
+
scanner.scan();
|
|
11981
|
+
return scanner.getToken();
|
|
11982
|
+
}
|
|
11956
11983
|
function getErrorSpanForArrowFunction(sourceFile, node) {
|
|
11957
11984
|
const pos = skipTrivia(sourceFile.text, node.pos);
|
|
11958
11985
|
if (node.body && node.body.kind === 238 /* Block */) {
|
|
@@ -13553,7 +13580,8 @@ function isStringANonContextualKeyword(name) {
|
|
|
13553
13580
|
const token = stringToToken(name);
|
|
13554
13581
|
return token !== void 0 && isNonContextualKeyword(token);
|
|
13555
13582
|
}
|
|
13556
|
-
function isIdentifierANonContextualKeyword(
|
|
13583
|
+
function isIdentifierANonContextualKeyword(node) {
|
|
13584
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
13557
13585
|
return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind);
|
|
13558
13586
|
}
|
|
13559
13587
|
function getFunctionFlags(node) {
|
|
@@ -14365,7 +14393,7 @@ function isThisInTypeQuery(node) {
|
|
|
14365
14393
|
return node.parent.kind === 183 /* TypeQuery */;
|
|
14366
14394
|
}
|
|
14367
14395
|
function identifierIsThisKeyword(id) {
|
|
14368
|
-
return id.
|
|
14396
|
+
return id.escapedText === "this";
|
|
14369
14397
|
}
|
|
14370
14398
|
function getAllAccessorDeclarations(declarations, accessor) {
|
|
14371
14399
|
let firstAccessor;
|
|
@@ -14664,7 +14692,7 @@ function getEffectiveModifierFlagsNoCache(node) {
|
|
|
14664
14692
|
}
|
|
14665
14693
|
function getSyntacticModifierFlagsNoCache(node) {
|
|
14666
14694
|
let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;
|
|
14667
|
-
if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.
|
|
14695
|
+
if (node.flags & 4 /* NestedNamespace */ || node.kind === 79 /* Identifier */ && node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
14668
14696
|
flags |= 1 /* Export */;
|
|
14669
14697
|
}
|
|
14670
14698
|
return flags;
|
|
@@ -15301,7 +15329,6 @@ function Identifier2(kind, pos, end) {
|
|
|
15301
15329
|
this.parent = void 0;
|
|
15302
15330
|
this.original = void 0;
|
|
15303
15331
|
this.emitNode = void 0;
|
|
15304
|
-
this.flowNode = void 0;
|
|
15305
15332
|
}
|
|
15306
15333
|
function SourceMapSource(fileName, text, skipTrivia2) {
|
|
15307
15334
|
this.fileName = fileName;
|
|
@@ -17247,7 +17274,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17247
17274
|
createRegularExpressionLiteral,
|
|
17248
17275
|
createLiteralLikeNode,
|
|
17249
17276
|
createIdentifier,
|
|
17250
|
-
updateIdentifier,
|
|
17251
17277
|
createTempVariable,
|
|
17252
17278
|
createLoopVariable,
|
|
17253
17279
|
createUniqueName,
|
|
@@ -17990,55 +18016,43 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
17990
18016
|
);
|
|
17991
18017
|
}
|
|
17992
18018
|
}
|
|
17993
|
-
function createBaseIdentifier(escapedText
|
|
18019
|
+
function createBaseIdentifier(escapedText) {
|
|
17994
18020
|
const node = baseFactory2.createBaseIdentifierNode(79 /* Identifier */);
|
|
17995
|
-
node.originalKeywordKind = originalKeywordKind;
|
|
17996
18021
|
node.escapedText = escapedText;
|
|
17997
|
-
node.autoGenerate = void 0;
|
|
17998
|
-
node.typeArguments = void 0;
|
|
17999
|
-
node.hasExtendedUnicodeEscape = void 0;
|
|
18000
18022
|
node.jsDoc = void 0;
|
|
18001
|
-
node.jsDocCache = void 0;
|
|
18002
18023
|
node.flowNode = void 0;
|
|
18003
18024
|
node.symbol = void 0;
|
|
18004
18025
|
return node;
|
|
18005
18026
|
}
|
|
18006
18027
|
function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
18007
|
-
const node = createBaseIdentifier(
|
|
18008
|
-
|
|
18009
|
-
/*originalKeywordKind*/
|
|
18010
|
-
void 0
|
|
18011
|
-
);
|
|
18012
|
-
node.autoGenerate = {
|
|
18028
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text));
|
|
18029
|
+
setIdentifierAutoGenerate(node, {
|
|
18013
18030
|
flags: autoGenerateFlags,
|
|
18014
18031
|
id: nextAutoGenerateId,
|
|
18015
18032
|
prefix,
|
|
18016
18033
|
suffix
|
|
18017
|
-
};
|
|
18034
|
+
});
|
|
18018
18035
|
nextAutoGenerateId++;
|
|
18019
18036
|
return node;
|
|
18020
18037
|
}
|
|
18021
|
-
function createIdentifier(text,
|
|
18038
|
+
function createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape) {
|
|
18022
18039
|
if (originalKeywordKind === void 0 && text) {
|
|
18023
18040
|
originalKeywordKind = stringToToken(text);
|
|
18024
18041
|
}
|
|
18025
18042
|
if (originalKeywordKind === 79 /* Identifier */) {
|
|
18026
18043
|
originalKeywordKind = void 0;
|
|
18027
18044
|
}
|
|
18028
|
-
const node = createBaseIdentifier(escapeLeadingUnderscores(text)
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
if (node.
|
|
18045
|
+
const node = createBaseIdentifier(escapeLeadingUnderscores(text));
|
|
18046
|
+
if (hasExtendedUnicodeEscape)
|
|
18047
|
+
node.flags |= 128 /* IdentifierHasExtendedUnicodeEscape */;
|
|
18048
|
+
if (node.escapedText === "await") {
|
|
18032
18049
|
node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */;
|
|
18033
18050
|
}
|
|
18034
|
-
if (node.
|
|
18051
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
18035
18052
|
node.transformFlags |= 1024 /* ContainsES2015 */;
|
|
18036
18053
|
}
|
|
18037
18054
|
return node;
|
|
18038
18055
|
}
|
|
18039
|
-
function updateIdentifier(node, typeArguments) {
|
|
18040
|
-
return node.typeArguments !== typeArguments ? update(createIdentifier(idText(node), typeArguments), node) : node;
|
|
18041
|
-
}
|
|
18042
18056
|
function createTempVariable(recordTempVariable, reservedInNestedScopes, prefix, suffix) {
|
|
18043
18057
|
let flags2 = 1 /* Auto */;
|
|
18044
18058
|
if (reservedInNestedScopes)
|
|
@@ -18086,7 +18100,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18086
18100
|
function createBasePrivateIdentifier(escapedText) {
|
|
18087
18101
|
const node = baseFactory2.createBasePrivateIdentifierNode(80 /* PrivateIdentifier */);
|
|
18088
18102
|
node.escapedText = escapedText;
|
|
18089
|
-
node.autoGenerate = void 0;
|
|
18090
18103
|
node.transformFlags |= 16777216 /* ContainsClassFields */;
|
|
18091
18104
|
return node;
|
|
18092
18105
|
}
|
|
@@ -18097,12 +18110,12 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18097
18110
|
}
|
|
18098
18111
|
function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) {
|
|
18099
18112
|
const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text));
|
|
18100
|
-
node
|
|
18113
|
+
setIdentifierAutoGenerate(node, {
|
|
18101
18114
|
flags: autoGenerateFlags,
|
|
18102
18115
|
id: nextAutoGenerateId,
|
|
18103
18116
|
prefix,
|
|
18104
18117
|
suffix
|
|
18105
|
-
};
|
|
18118
|
+
});
|
|
18106
18119
|
nextAutoGenerateId++;
|
|
18107
18120
|
return node;
|
|
18108
18121
|
}
|
|
@@ -18264,7 +18277,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18264
18277
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18265
18278
|
node.expression = void 0;
|
|
18266
18279
|
node.jsDoc = void 0;
|
|
18267
|
-
node.jsDocCache = void 0;
|
|
18268
18280
|
return node;
|
|
18269
18281
|
}
|
|
18270
18282
|
function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) {
|
|
@@ -18285,7 +18297,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18285
18297
|
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 */);
|
|
18286
18298
|
}
|
|
18287
18299
|
node.jsDoc = void 0;
|
|
18288
|
-
node.jsDocCache = void 0;
|
|
18289
18300
|
return node;
|
|
18290
18301
|
}
|
|
18291
18302
|
function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
|
|
@@ -18313,7 +18324,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18313
18324
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18314
18325
|
node.initializer = void 0;
|
|
18315
18326
|
node.jsDoc = void 0;
|
|
18316
|
-
node.jsDocCache = void 0;
|
|
18317
18327
|
return node;
|
|
18318
18328
|
}
|
|
18319
18329
|
function updatePropertySignature(node, modifiers, name, questionToken, type) {
|
|
@@ -18336,7 +18346,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18336
18346
|
const isAmbient = node.flags & 16777216 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */;
|
|
18337
18347
|
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 */;
|
|
18338
18348
|
node.jsDoc = void 0;
|
|
18339
|
-
node.jsDocCache = void 0;
|
|
18340
18349
|
return node;
|
|
18341
18350
|
}
|
|
18342
18351
|
function updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer) {
|
|
@@ -18352,7 +18361,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18352
18361
|
node.type = type;
|
|
18353
18362
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18354
18363
|
node.jsDoc = void 0;
|
|
18355
|
-
node.jsDocCache = void 0;
|
|
18356
18364
|
node.locals = void 0;
|
|
18357
18365
|
node.nextContainer = void 0;
|
|
18358
18366
|
node.typeArguments = void 0;
|
|
@@ -18382,7 +18390,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18382
18390
|
}
|
|
18383
18391
|
node.typeArguments = void 0;
|
|
18384
18392
|
node.jsDoc = void 0;
|
|
18385
|
-
node.jsDocCache = void 0;
|
|
18386
18393
|
node.locals = void 0;
|
|
18387
18394
|
node.nextContainer = void 0;
|
|
18388
18395
|
node.flowNode = void 0;
|
|
@@ -18406,7 +18413,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18406
18413
|
node.illegalDecorators = void 0;
|
|
18407
18414
|
node.modifiers = void 0;
|
|
18408
18415
|
node.jsDoc = void 0;
|
|
18409
|
-
node.jsDocCache = void 0;
|
|
18410
18416
|
node.locals = void 0;
|
|
18411
18417
|
node.nextContainer = void 0;
|
|
18412
18418
|
node.endFlowNode = void 0;
|
|
@@ -18434,7 +18440,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18434
18440
|
node.type = void 0;
|
|
18435
18441
|
node.typeArguments = void 0;
|
|
18436
18442
|
node.jsDoc = void 0;
|
|
18437
|
-
node.jsDocCache = void 0;
|
|
18438
18443
|
node.locals = void 0;
|
|
18439
18444
|
node.nextContainer = void 0;
|
|
18440
18445
|
node.endFlowNode = void 0;
|
|
@@ -18467,7 +18472,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18467
18472
|
node.typeArguments = void 0;
|
|
18468
18473
|
node.typeParameters = void 0;
|
|
18469
18474
|
node.jsDoc = void 0;
|
|
18470
|
-
node.jsDocCache = void 0;
|
|
18471
18475
|
node.locals = void 0;
|
|
18472
18476
|
node.nextContainer = void 0;
|
|
18473
18477
|
node.flowNode = void 0;
|
|
@@ -18499,7 +18503,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18499
18503
|
node.typeParameters = void 0;
|
|
18500
18504
|
node.type = void 0;
|
|
18501
18505
|
node.jsDoc = void 0;
|
|
18502
|
-
node.jsDocCache = void 0;
|
|
18503
18506
|
node.locals = void 0;
|
|
18504
18507
|
node.nextContainer = void 0;
|
|
18505
18508
|
node.flowNode = void 0;
|
|
@@ -18524,7 +18527,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18524
18527
|
node.type = type;
|
|
18525
18528
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18526
18529
|
node.jsDoc = void 0;
|
|
18527
|
-
node.jsDocCache = void 0;
|
|
18528
18530
|
node.locals = void 0;
|
|
18529
18531
|
node.nextContainer = void 0;
|
|
18530
18532
|
node.typeArguments = void 0;
|
|
@@ -18540,7 +18542,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18540
18542
|
node.type = type;
|
|
18541
18543
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18542
18544
|
node.jsDoc = void 0;
|
|
18543
|
-
node.jsDocCache = void 0;
|
|
18544
18545
|
node.locals = void 0;
|
|
18545
18546
|
node.nextContainer = void 0;
|
|
18546
18547
|
node.typeArguments = void 0;
|
|
@@ -18557,7 +18558,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18557
18558
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18558
18559
|
node.illegalDecorators = void 0;
|
|
18559
18560
|
node.jsDoc = void 0;
|
|
18560
|
-
node.jsDocCache = void 0;
|
|
18561
18561
|
node.locals = void 0;
|
|
18562
18562
|
node.nextContainer = void 0;
|
|
18563
18563
|
node.typeArguments = void 0;
|
|
@@ -18608,7 +18608,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18608
18608
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18609
18609
|
node.modifiers = void 0;
|
|
18610
18610
|
node.jsDoc = void 0;
|
|
18611
|
-
node.jsDocCache = void 0;
|
|
18612
18611
|
node.locals = void 0;
|
|
18613
18612
|
node.nextContainer = void 0;
|
|
18614
18613
|
node.typeArguments = void 0;
|
|
@@ -18634,7 +18633,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18634
18633
|
node.type = type;
|
|
18635
18634
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18636
18635
|
node.jsDoc = void 0;
|
|
18637
|
-
node.jsDocCache = void 0;
|
|
18638
18636
|
node.locals = void 0;
|
|
18639
18637
|
node.nextContainer = void 0;
|
|
18640
18638
|
node.typeArguments = void 0;
|
|
@@ -18703,7 +18701,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18703
18701
|
node.type = type;
|
|
18704
18702
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
18705
18703
|
node.jsDoc = void 0;
|
|
18706
|
-
node.jsDocCache = void 0;
|
|
18707
18704
|
return node;
|
|
18708
18705
|
}
|
|
18709
18706
|
function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) {
|
|
@@ -18905,7 +18902,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18905
18902
|
node.multiLine = multiLine;
|
|
18906
18903
|
node.transformFlags |= propagateChildrenFlags(node.properties);
|
|
18907
18904
|
node.jsDoc = void 0;
|
|
18908
|
-
node.jsDocCache = void 0;
|
|
18909
18905
|
return node;
|
|
18910
18906
|
}
|
|
18911
18907
|
function updateObjectLiteralExpression(node, properties) {
|
|
@@ -18918,7 +18914,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18918
18914
|
node.name = name;
|
|
18919
18915
|
node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */);
|
|
18920
18916
|
node.jsDoc = void 0;
|
|
18921
|
-
node.jsDocCache = void 0;
|
|
18922
18917
|
node.flowNode = void 0;
|
|
18923
18918
|
return node;
|
|
18924
18919
|
}
|
|
@@ -18969,7 +18964,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
18969
18964
|
node.argumentExpression = argumentExpression;
|
|
18970
18965
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression);
|
|
18971
18966
|
node.jsDoc = void 0;
|
|
18972
|
-
node.jsDocCache = void 0;
|
|
18973
18967
|
node.flowNode = void 0;
|
|
18974
18968
|
return node;
|
|
18975
18969
|
}
|
|
@@ -19120,7 +19114,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19120
19114
|
node.expression = expression;
|
|
19121
19115
|
node.transformFlags = propagateChildFlags(node.expression);
|
|
19122
19116
|
node.jsDoc = void 0;
|
|
19123
|
-
node.jsDocCache = void 0;
|
|
19124
19117
|
return node;
|
|
19125
19118
|
}
|
|
19126
19119
|
function updateParenthesizedExpression(node, expression) {
|
|
@@ -19141,7 +19134,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19141
19134
|
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 */;
|
|
19142
19135
|
node.typeArguments = void 0;
|
|
19143
19136
|
node.jsDoc = void 0;
|
|
19144
|
-
node.jsDocCache = void 0;
|
|
19145
19137
|
node.locals = void 0;
|
|
19146
19138
|
node.nextContainer = void 0;
|
|
19147
19139
|
node.flowNode = void 0;
|
|
@@ -19164,7 +19156,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19164
19156
|
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 */;
|
|
19165
19157
|
node.typeArguments = void 0;
|
|
19166
19158
|
node.jsDoc = void 0;
|
|
19167
|
-
node.jsDocCache = void 0;
|
|
19168
19159
|
node.locals = void 0;
|
|
19169
19160
|
node.nextContainer = void 0;
|
|
19170
19161
|
node.flowNode = void 0;
|
|
@@ -19262,7 +19253,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19262
19253
|
node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */;
|
|
19263
19254
|
}
|
|
19264
19255
|
node.jsDoc = void 0;
|
|
19265
|
-
node.jsDocCache = void 0;
|
|
19266
19256
|
return node;
|
|
19267
19257
|
}
|
|
19268
19258
|
function propagateAssignmentPatternFlags(node) {
|
|
@@ -19404,7 +19394,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19404
19394
|
node.members = createNodeArray(members);
|
|
19405
19395
|
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 */;
|
|
19406
19396
|
node.jsDoc = void 0;
|
|
19407
|
-
node.jsDocCache = void 0;
|
|
19408
19397
|
return node;
|
|
19409
19398
|
}
|
|
19410
19399
|
function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -19520,7 +19509,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19520
19509
|
node.multiLine = multiLine;
|
|
19521
19510
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
19522
19511
|
node.jsDoc = void 0;
|
|
19523
|
-
node.jsDocCache = void 0;
|
|
19524
19512
|
node.locals = void 0;
|
|
19525
19513
|
node.nextContainer = void 0;
|
|
19526
19514
|
return node;
|
|
@@ -19538,7 +19526,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19538
19526
|
}
|
|
19539
19527
|
node.illegalDecorators = void 0;
|
|
19540
19528
|
node.jsDoc = void 0;
|
|
19541
|
-
node.jsDocCache = void 0;
|
|
19542
19529
|
node.flowNode = void 0;
|
|
19543
19530
|
return node;
|
|
19544
19531
|
}
|
|
@@ -19548,7 +19535,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19548
19535
|
function createEmptyStatement() {
|
|
19549
19536
|
const node = createBaseNode(239 /* EmptyStatement */);
|
|
19550
19537
|
node.jsDoc = void 0;
|
|
19551
|
-
node.jsDocCache = void 0;
|
|
19552
19538
|
return node;
|
|
19553
19539
|
}
|
|
19554
19540
|
function createExpressionStatement(expression) {
|
|
@@ -19556,7 +19542,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19556
19542
|
node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
|
|
19557
19543
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
19558
19544
|
node.jsDoc = void 0;
|
|
19559
|
-
node.jsDocCache = void 0;
|
|
19560
19545
|
node.flowNode = void 0;
|
|
19561
19546
|
return node;
|
|
19562
19547
|
}
|
|
@@ -19570,7 +19555,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19570
19555
|
node.elseStatement = asEmbeddedStatement(elseStatement);
|
|
19571
19556
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement);
|
|
19572
19557
|
node.jsDoc = void 0;
|
|
19573
|
-
node.jsDocCache = void 0;
|
|
19574
19558
|
node.flowNode = void 0;
|
|
19575
19559
|
return node;
|
|
19576
19560
|
}
|
|
@@ -19583,7 +19567,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19583
19567
|
node.expression = expression;
|
|
19584
19568
|
node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression);
|
|
19585
19569
|
node.jsDoc = void 0;
|
|
19586
|
-
node.jsDocCache = void 0;
|
|
19587
19570
|
node.flowNode = void 0;
|
|
19588
19571
|
return node;
|
|
19589
19572
|
}
|
|
@@ -19596,7 +19579,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19596
19579
|
node.statement = asEmbeddedStatement(statement);
|
|
19597
19580
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
19598
19581
|
node.jsDoc = void 0;
|
|
19599
|
-
node.jsDocCache = void 0;
|
|
19600
19582
|
node.flowNode = void 0;
|
|
19601
19583
|
return node;
|
|
19602
19584
|
}
|
|
@@ -19611,7 +19593,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19611
19593
|
node.statement = asEmbeddedStatement(statement);
|
|
19612
19594
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement);
|
|
19613
19595
|
node.jsDoc = void 0;
|
|
19614
|
-
node.jsDocCache = void 0;
|
|
19615
19596
|
node.locals = void 0;
|
|
19616
19597
|
node.nextContainer = void 0;
|
|
19617
19598
|
node.flowNode = void 0;
|
|
@@ -19627,7 +19608,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19627
19608
|
node.statement = asEmbeddedStatement(statement);
|
|
19628
19609
|
node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
19629
19610
|
node.jsDoc = void 0;
|
|
19630
|
-
node.jsDocCache = void 0;
|
|
19631
19611
|
node.locals = void 0;
|
|
19632
19612
|
node.nextContainer = void 0;
|
|
19633
19613
|
node.flowNode = void 0;
|
|
@@ -19646,7 +19626,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19646
19626
|
if (awaitModifier)
|
|
19647
19627
|
node.transformFlags |= 128 /* ContainsES2018 */;
|
|
19648
19628
|
node.jsDoc = void 0;
|
|
19649
|
-
node.jsDocCache = void 0;
|
|
19650
19629
|
node.locals = void 0;
|
|
19651
19630
|
node.nextContainer = void 0;
|
|
19652
19631
|
node.flowNode = void 0;
|
|
@@ -19660,7 +19639,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19660
19639
|
node.label = asName(label);
|
|
19661
19640
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
19662
19641
|
node.jsDoc = void 0;
|
|
19663
|
-
node.jsDocCache = void 0;
|
|
19664
19642
|
node.flowNode = void 0;
|
|
19665
19643
|
return node;
|
|
19666
19644
|
}
|
|
@@ -19672,7 +19650,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19672
19650
|
node.label = asName(label);
|
|
19673
19651
|
node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
19674
19652
|
node.jsDoc = void 0;
|
|
19675
|
-
node.jsDocCache = void 0;
|
|
19676
19653
|
node.flowNode = void 0;
|
|
19677
19654
|
return node;
|
|
19678
19655
|
}
|
|
@@ -19684,7 +19661,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19684
19661
|
node.expression = expression;
|
|
19685
19662
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */;
|
|
19686
19663
|
node.jsDoc = void 0;
|
|
19687
|
-
node.jsDocCache = void 0;
|
|
19688
19664
|
node.flowNode = void 0;
|
|
19689
19665
|
return node;
|
|
19690
19666
|
}
|
|
@@ -19697,7 +19673,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19697
19673
|
node.statement = asEmbeddedStatement(statement);
|
|
19698
19674
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement);
|
|
19699
19675
|
node.jsDoc = void 0;
|
|
19700
|
-
node.jsDocCache = void 0;
|
|
19701
19676
|
node.flowNode = void 0;
|
|
19702
19677
|
return node;
|
|
19703
19678
|
}
|
|
@@ -19710,7 +19685,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19710
19685
|
node.caseBlock = caseBlock;
|
|
19711
19686
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock);
|
|
19712
19687
|
node.jsDoc = void 0;
|
|
19713
|
-
node.jsDocCache = void 0;
|
|
19714
19688
|
node.flowNode = void 0;
|
|
19715
19689
|
node.possiblyExhaustive = false;
|
|
19716
19690
|
return node;
|
|
@@ -19724,7 +19698,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19724
19698
|
node.statement = asEmbeddedStatement(statement);
|
|
19725
19699
|
node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement);
|
|
19726
19700
|
node.jsDoc = void 0;
|
|
19727
|
-
node.jsDocCache = void 0;
|
|
19728
19701
|
node.flowNode = void 0;
|
|
19729
19702
|
return node;
|
|
19730
19703
|
}
|
|
@@ -19736,7 +19709,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19736
19709
|
node.expression = expression;
|
|
19737
19710
|
node.transformFlags |= propagateChildFlags(node.expression);
|
|
19738
19711
|
node.jsDoc = void 0;
|
|
19739
|
-
node.jsDocCache = void 0;
|
|
19740
19712
|
node.flowNode = void 0;
|
|
19741
19713
|
return node;
|
|
19742
19714
|
}
|
|
@@ -19750,7 +19722,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19750
19722
|
node.finallyBlock = finallyBlock;
|
|
19751
19723
|
node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock);
|
|
19752
19724
|
node.jsDoc = void 0;
|
|
19753
|
-
node.jsDocCache = void 0;
|
|
19754
19725
|
node.flowNode = void 0;
|
|
19755
19726
|
return node;
|
|
19756
19727
|
}
|
|
@@ -19760,7 +19731,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19760
19731
|
function createDebuggerStatement() {
|
|
19761
19732
|
const node = createBaseNode(256 /* DebuggerStatement */);
|
|
19762
19733
|
node.jsDoc = void 0;
|
|
19763
|
-
node.jsDocCache = void 0;
|
|
19764
19734
|
node.flowNode = void 0;
|
|
19765
19735
|
return node;
|
|
19766
19736
|
}
|
|
@@ -19773,7 +19743,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19773
19743
|
node.initializer = asInitializer(initializer);
|
|
19774
19744
|
node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (((_a2 = node.exclamationToken) != null ? _a2 : node.type) ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
19775
19745
|
node.jsDoc = void 0;
|
|
19776
|
-
node.jsDocCache = void 0;
|
|
19777
19746
|
return node;
|
|
19778
19747
|
}
|
|
19779
19748
|
function updateVariableDeclaration(node, name, exclamationToken, type, initializer) {
|
|
@@ -19812,7 +19781,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19812
19781
|
node.illegalDecorators = void 0;
|
|
19813
19782
|
node.typeArguments = void 0;
|
|
19814
19783
|
node.jsDoc = void 0;
|
|
19815
|
-
node.jsDocCache = void 0;
|
|
19816
19784
|
node.locals = void 0;
|
|
19817
19785
|
node.nextContainer = void 0;
|
|
19818
19786
|
node.endFlowNode = void 0;
|
|
@@ -19844,7 +19812,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19844
19812
|
}
|
|
19845
19813
|
}
|
|
19846
19814
|
node.jsDoc = void 0;
|
|
19847
|
-
node.jsDocCache = void 0;
|
|
19848
19815
|
return node;
|
|
19849
19816
|
}
|
|
19850
19817
|
function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -19860,7 +19827,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19860
19827
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
19861
19828
|
node.illegalDecorators = void 0;
|
|
19862
19829
|
node.jsDoc = void 0;
|
|
19863
|
-
node.jsDocCache = void 0;
|
|
19864
19830
|
return node;
|
|
19865
19831
|
}
|
|
19866
19832
|
function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -19881,7 +19847,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19881
19847
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
19882
19848
|
node.illegalDecorators = void 0;
|
|
19883
19849
|
node.jsDoc = void 0;
|
|
19884
|
-
node.jsDocCache = void 0;
|
|
19885
19850
|
node.locals = void 0;
|
|
19886
19851
|
node.nextContainer = void 0;
|
|
19887
19852
|
return node;
|
|
@@ -19904,7 +19869,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19904
19869
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
19905
19870
|
node.illegalDecorators = void 0;
|
|
19906
19871
|
node.jsDoc = void 0;
|
|
19907
|
-
node.jsDocCache = void 0;
|
|
19908
19872
|
return node;
|
|
19909
19873
|
}
|
|
19910
19874
|
function updateEnumDeclaration(node, modifiers, name, members) {
|
|
@@ -19930,7 +19894,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19930
19894
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
19931
19895
|
node.illegalDecorators = void 0;
|
|
19932
19896
|
node.jsDoc = void 0;
|
|
19933
|
-
node.jsDocCache = void 0;
|
|
19934
19897
|
node.locals = void 0;
|
|
19935
19898
|
node.nextContainer = void 0;
|
|
19936
19899
|
return node;
|
|
@@ -19949,7 +19912,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19949
19912
|
node.statements = createNodeArray(statements);
|
|
19950
19913
|
node.transformFlags |= propagateChildrenFlags(node.statements);
|
|
19951
19914
|
node.jsDoc = void 0;
|
|
19952
|
-
node.jsDocCache = void 0;
|
|
19953
19915
|
return node;
|
|
19954
19916
|
}
|
|
19955
19917
|
function updateModuleBlock(node, statements) {
|
|
@@ -19973,7 +19935,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19973
19935
|
node.illegalDecorators = void 0;
|
|
19974
19936
|
node.modifiers = void 0;
|
|
19975
19937
|
node.jsDoc = void 0;
|
|
19976
|
-
node.jsDocCache = void 0;
|
|
19977
19938
|
return node;
|
|
19978
19939
|
}
|
|
19979
19940
|
function updateNamespaceExportDeclaration(node, name) {
|
|
@@ -19999,7 +19960,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19999
19960
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
20000
19961
|
node.illegalDecorators = void 0;
|
|
20001
19962
|
node.jsDoc = void 0;
|
|
20002
|
-
node.jsDocCache = void 0;
|
|
20003
19963
|
return node;
|
|
20004
19964
|
}
|
|
20005
19965
|
function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) {
|
|
@@ -20021,7 +19981,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20021
19981
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
20022
19982
|
node.illegalDecorators = void 0;
|
|
20023
19983
|
node.jsDoc = void 0;
|
|
20024
|
-
node.jsDocCache = void 0;
|
|
20025
19984
|
return node;
|
|
20026
19985
|
}
|
|
20027
19986
|
function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) {
|
|
@@ -20133,7 +20092,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20133
20092
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
20134
20093
|
node.illegalDecorators = void 0;
|
|
20135
20094
|
node.jsDoc = void 0;
|
|
20136
|
-
node.jsDocCache = void 0;
|
|
20137
20095
|
return node;
|
|
20138
20096
|
}
|
|
20139
20097
|
function updateExportAssignment(node, modifiers, expression) {
|
|
@@ -20156,7 +20114,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20156
20114
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
20157
20115
|
node.illegalDecorators = void 0;
|
|
20158
20116
|
node.jsDoc = void 0;
|
|
20159
|
-
node.jsDocCache = void 0;
|
|
20160
20117
|
return node;
|
|
20161
20118
|
}
|
|
20162
20119
|
function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
|
|
@@ -20186,7 +20143,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20186
20143
|
node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name);
|
|
20187
20144
|
node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */;
|
|
20188
20145
|
node.jsDoc = void 0;
|
|
20189
|
-
node.jsDocCache = void 0;
|
|
20190
20146
|
return node;
|
|
20191
20147
|
}
|
|
20192
20148
|
function updateExportSpecifier(node, isTypeOnly, propertyName, name) {
|
|
@@ -20195,7 +20151,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20195
20151
|
function createMissingDeclaration() {
|
|
20196
20152
|
const node = createBaseDeclaration(279 /* MissingDeclaration */);
|
|
20197
20153
|
node.jsDoc = void 0;
|
|
20198
|
-
node.jsDocCache = void 0;
|
|
20199
20154
|
return node;
|
|
20200
20155
|
}
|
|
20201
20156
|
function createExternalModuleReference(expression) {
|
|
@@ -20236,7 +20191,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20236
20191
|
node.type = type;
|
|
20237
20192
|
node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */);
|
|
20238
20193
|
node.jsDoc = void 0;
|
|
20239
|
-
node.jsDocCache = void 0;
|
|
20240
20194
|
node.locals = void 0;
|
|
20241
20195
|
node.nextContainer = void 0;
|
|
20242
20196
|
node.typeArguments = void 0;
|
|
@@ -20268,7 +20222,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20268
20222
|
node.parameters = createNodeArray(parameters);
|
|
20269
20223
|
node.type = type;
|
|
20270
20224
|
node.jsDoc = void 0;
|
|
20271
|
-
node.jsDocCache = void 0;
|
|
20272
20225
|
node.locals = void 0;
|
|
20273
20226
|
node.nextContainer = void 0;
|
|
20274
20227
|
return node;
|
|
@@ -20596,7 +20549,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20596
20549
|
node.statements = createNodeArray(statements);
|
|
20597
20550
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements);
|
|
20598
20551
|
node.jsDoc = void 0;
|
|
20599
|
-
node.jsDocCache = void 0;
|
|
20600
20552
|
return node;
|
|
20601
20553
|
}
|
|
20602
20554
|
function updateCaseClause(node, expression, statements) {
|
|
@@ -20653,7 +20605,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20653
20605
|
node.questionToken = void 0;
|
|
20654
20606
|
node.exclamationToken = void 0;
|
|
20655
20607
|
node.jsDoc = void 0;
|
|
20656
|
-
node.jsDocCache = void 0;
|
|
20657
20608
|
return node;
|
|
20658
20609
|
}
|
|
20659
20610
|
function updatePropertyAssignment(node, name, initializer) {
|
|
@@ -20679,7 +20630,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20679
20630
|
node.questionToken = void 0;
|
|
20680
20631
|
node.exclamationToken = void 0;
|
|
20681
20632
|
node.jsDoc = void 0;
|
|
20682
|
-
node.jsDocCache = void 0;
|
|
20683
20633
|
return node;
|
|
20684
20634
|
}
|
|
20685
20635
|
function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) {
|
|
@@ -20700,7 +20650,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20700
20650
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
20701
20651
|
node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */;
|
|
20702
20652
|
node.jsDoc = void 0;
|
|
20703
|
-
node.jsDocCache = void 0;
|
|
20704
20653
|
return node;
|
|
20705
20654
|
}
|
|
20706
20655
|
function updateSpreadAssignment(node, expression) {
|
|
@@ -20712,7 +20661,6 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20712
20661
|
node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
|
|
20713
20662
|
node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */;
|
|
20714
20663
|
node.jsDoc = void 0;
|
|
20715
|
-
node.jsDocCache = void 0;
|
|
20716
20664
|
return node;
|
|
20717
20665
|
}
|
|
20718
20666
|
function updateEnumMember(node, name, initializer) {
|
|
@@ -20958,36 +20906,32 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
20958
20906
|
return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node;
|
|
20959
20907
|
}
|
|
20960
20908
|
function cloneGeneratedIdentifier(node) {
|
|
20961
|
-
const clone2 = createBaseIdentifier(
|
|
20962
|
-
node.escapedText,
|
|
20963
|
-
/*originalKeywordKind*/
|
|
20964
|
-
void 0
|
|
20965
|
-
);
|
|
20909
|
+
const clone2 = createBaseIdentifier(node.escapedText);
|
|
20966
20910
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
20967
|
-
clone2.autoGenerate = { ...node.autoGenerate };
|
|
20968
20911
|
clone2.transformFlags = node.transformFlags;
|
|
20969
20912
|
setOriginalNode(clone2, node);
|
|
20913
|
+
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
20970
20914
|
return clone2;
|
|
20971
20915
|
}
|
|
20972
20916
|
function cloneIdentifier(node) {
|
|
20973
|
-
const clone2 = createBaseIdentifier(node.escapedText
|
|
20917
|
+
const clone2 = createBaseIdentifier(node.escapedText);
|
|
20974
20918
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
20975
|
-
clone2.typeArguments = node.typeArguments;
|
|
20976
|
-
clone2.hasExtendedUnicodeEscape = node.hasExtendedUnicodeEscape;
|
|
20977
20919
|
clone2.jsDoc = node.jsDoc;
|
|
20978
|
-
clone2.jsDocCache = node.jsDocCache;
|
|
20979
20920
|
clone2.flowNode = node.flowNode;
|
|
20980
20921
|
clone2.symbol = node.symbol;
|
|
20981
20922
|
clone2.transformFlags = node.transformFlags;
|
|
20982
20923
|
setOriginalNode(clone2, node);
|
|
20924
|
+
const typeArguments = getIdentifierTypeArguments(node);
|
|
20925
|
+
if (typeArguments)
|
|
20926
|
+
setIdentifierTypeArguments(clone2, typeArguments);
|
|
20983
20927
|
return clone2;
|
|
20984
20928
|
}
|
|
20985
20929
|
function cloneGeneratedPrivateIdentifier(node) {
|
|
20986
20930
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
20987
20931
|
clone2.flags |= node.flags & ~8 /* Synthesized */;
|
|
20988
|
-
clone2.autoGenerate = { ...node.autoGenerate };
|
|
20989
20932
|
clone2.transformFlags = node.transformFlags;
|
|
20990
20933
|
setOriginalNode(clone2, node);
|
|
20934
|
+
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
20991
20935
|
return clone2;
|
|
20992
20936
|
}
|
|
20993
20937
|
function clonePrivateIdentifier(node) {
|
|
@@ -22195,6 +22139,26 @@ function getTypeNode(node) {
|
|
|
22195
22139
|
var _a2;
|
|
22196
22140
|
return (_a2 = node.emitNode) == null ? void 0 : _a2.typeNode;
|
|
22197
22141
|
}
|
|
22142
|
+
function setIdentifierTypeArguments(node, typeArguments) {
|
|
22143
|
+
getOrCreateEmitNode(node).identifierTypeArguments = typeArguments;
|
|
22144
|
+
return node;
|
|
22145
|
+
}
|
|
22146
|
+
function getIdentifierTypeArguments(node) {
|
|
22147
|
+
var _a2;
|
|
22148
|
+
return (_a2 = node.emitNode) == null ? void 0 : _a2.identifierTypeArguments;
|
|
22149
|
+
}
|
|
22150
|
+
function setIdentifierAutoGenerate(node, autoGenerate) {
|
|
22151
|
+
getOrCreateEmitNode(node).autoGenerate = autoGenerate;
|
|
22152
|
+
return node;
|
|
22153
|
+
}
|
|
22154
|
+
function setIdentifierGeneratedImportReference(node, value) {
|
|
22155
|
+
getOrCreateEmitNode(node).generatedImportReference = value;
|
|
22156
|
+
return node;
|
|
22157
|
+
}
|
|
22158
|
+
function getIdentifierGeneratedImportReference(node) {
|
|
22159
|
+
var _a2;
|
|
22160
|
+
return (_a2 = node.emitNode) == null ? void 0 : _a2.generatedImportReference;
|
|
22161
|
+
}
|
|
22198
22162
|
|
|
22199
22163
|
// src/compiler/factory/emitHelpers.ts
|
|
22200
22164
|
function createEmitHelperFactory(context) {
|
|
@@ -24421,13 +24385,16 @@ function elideNodes(factory2, nodes) {
|
|
|
24421
24385
|
return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes);
|
|
24422
24386
|
}
|
|
24423
24387
|
function getNodeForGeneratedName(name) {
|
|
24424
|
-
|
|
24425
|
-
|
|
24388
|
+
var _a2;
|
|
24389
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
24390
|
+
if (autoGenerate.flags & 4 /* Node */) {
|
|
24391
|
+
const autoGenerateId = autoGenerate.id;
|
|
24426
24392
|
let node = name;
|
|
24427
24393
|
let original = node.original;
|
|
24428
24394
|
while (original) {
|
|
24429
24395
|
node = original;
|
|
24430
|
-
|
|
24396
|
+
const autoGenerate2 = (_a2 = node.emitNode) == null ? void 0 : _a2.autoGenerate;
|
|
24397
|
+
if (isMemberName(node) && (autoGenerate2 === void 0 || !!(autoGenerate2.flags & 4 /* Node */) && autoGenerate2.id !== autoGenerateId)) {
|
|
24431
24398
|
break;
|
|
24432
24399
|
}
|
|
24433
24400
|
original = node.original;
|
|
@@ -26026,8 +25993,6 @@ var Parser;
|
|
|
26026
25993
|
const pos = getNodePos();
|
|
26027
25994
|
const result = kind === 79 /* Identifier */ ? factory2.createIdentifier(
|
|
26028
25995
|
"",
|
|
26029
|
-
/*typeArguments*/
|
|
26030
|
-
void 0,
|
|
26031
25996
|
/*originalKeywordKind*/
|
|
26032
25997
|
void 0
|
|
26033
25998
|
) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(
|
|
@@ -26062,13 +26027,7 @@ var Parser;
|
|
|
26062
26027
|
const text = internIdentifier(scanner.getTokenValue());
|
|
26063
26028
|
const hasExtendedUnicodeEscape = scanner.hasExtendedUnicodeEscape();
|
|
26064
26029
|
nextTokenWithoutCheck();
|
|
26065
|
-
return finishNode(factory2.createIdentifier(
|
|
26066
|
-
text,
|
|
26067
|
-
/*typeArguments*/
|
|
26068
|
-
void 0,
|
|
26069
|
-
originalKeywordKind,
|
|
26070
|
-
hasExtendedUnicodeEscape
|
|
26071
|
-
), pos);
|
|
26030
|
+
return finishNode(factory2.createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos);
|
|
26072
26031
|
}
|
|
26073
26032
|
if (token() === 80 /* PrivateIdentifier */) {
|
|
26074
26033
|
parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
|
|
@@ -26410,6 +26369,7 @@ var Parser;
|
|
|
26410
26369
|
return parseElement();
|
|
26411
26370
|
}
|
|
26412
26371
|
function currentNode(parsingContext2, pos) {
|
|
26372
|
+
var _a2;
|
|
26413
26373
|
if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) {
|
|
26414
26374
|
return void 0;
|
|
26415
26375
|
}
|
|
@@ -26424,8 +26384,8 @@ var Parser;
|
|
|
26424
26384
|
if (!canReuseNode(node, parsingContext2)) {
|
|
26425
26385
|
return void 0;
|
|
26426
26386
|
}
|
|
26427
|
-
if (canHaveJSDoc(node) && node.jsDocCache) {
|
|
26428
|
-
node.jsDocCache = void 0;
|
|
26387
|
+
if (canHaveJSDoc(node) && ((_a2 = node.jsDoc) == null ? void 0 : _a2.jsDocCache)) {
|
|
26388
|
+
node.jsDoc.jsDocCache = void 0;
|
|
26429
26389
|
}
|
|
26430
26390
|
return node;
|
|
26431
26391
|
}
|
|
@@ -26484,7 +26444,7 @@ var Parser;
|
|
|
26484
26444
|
return true;
|
|
26485
26445
|
case 171 /* MethodDeclaration */:
|
|
26486
26446
|
const methodDeclaration = node;
|
|
26487
|
-
const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.
|
|
26447
|
+
const nameIsConstructor = methodDeclaration.name.kind === 79 /* Identifier */ && methodDeclaration.name.escapedText === "constructor";
|
|
26488
26448
|
return !nameIsConstructor;
|
|
26489
26449
|
}
|
|
26490
26450
|
}
|
|
@@ -26706,13 +26666,10 @@ var Parser;
|
|
|
26706
26666
|
function parseEntityName(allowReservedWords, diagnosticMessage) {
|
|
26707
26667
|
const pos = getNodePos();
|
|
26708
26668
|
let entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage);
|
|
26709
|
-
let dotPos = getNodePos();
|
|
26710
26669
|
while (parseOptional(24 /* DotToken */)) {
|
|
26711
26670
|
if (token() === 29 /* LessThanToken */) {
|
|
26712
|
-
entity.jsdocDotPos = dotPos;
|
|
26713
26671
|
break;
|
|
26714
26672
|
}
|
|
26715
|
-
dotPos = getNodePos();
|
|
26716
26673
|
entity = finishNode(
|
|
26717
26674
|
factory2.createQualifiedName(
|
|
26718
26675
|
entity,
|
|
@@ -31492,7 +31449,7 @@ var Parser;
|
|
|
31492
31449
|
return finishNode(jsDocNamespaceNode, pos);
|
|
31493
31450
|
}
|
|
31494
31451
|
if (nested) {
|
|
31495
|
-
typeNameOrNamespaceName.
|
|
31452
|
+
typeNameOrNamespaceName.flags |= 2048 /* IdentifierIsInJSDocNamespace */;
|
|
31496
31453
|
}
|
|
31497
31454
|
return typeNameOrNamespaceName;
|
|
31498
31455
|
}
|
|
@@ -31696,12 +31653,7 @@ var Parser;
|
|
|
31696
31653
|
const end2 = scanner.getTextPos();
|
|
31697
31654
|
const originalKeywordKind = token();
|
|
31698
31655
|
const text = internIdentifier(scanner.getTokenValue());
|
|
31699
|
-
const result = finishNode(factory2.createIdentifier(
|
|
31700
|
-
text,
|
|
31701
|
-
/*typeArguments*/
|
|
31702
|
-
void 0,
|
|
31703
|
-
originalKeywordKind
|
|
31704
|
-
), pos, end2);
|
|
31656
|
+
const result = finishNode(factory2.createIdentifier(text, originalKeywordKind), pos, end2);
|
|
31705
31657
|
nextTokenJSDoc();
|
|
31706
31658
|
return result;
|
|
31707
31659
|
}
|
|
@@ -32323,6 +32275,7 @@ var libEntries = [
|
|
|
32323
32275
|
["es2020", "lib.es2020.d.ts"],
|
|
32324
32276
|
["es2021", "lib.es2021.d.ts"],
|
|
32325
32277
|
["es2022", "lib.es2022.d.ts"],
|
|
32278
|
+
["es2023", "lib.es2023.d.ts"],
|
|
32326
32279
|
["esnext", "lib.esnext.d.ts"],
|
|
32327
32280
|
// Host only
|
|
32328
32281
|
["dom", "lib.dom.d.ts"],
|
|
@@ -32376,7 +32329,8 @@ var libEntries = [
|
|
|
32376
32329
|
["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
|
|
32377
32330
|
["es2022.string", "lib.es2022.string.d.ts"],
|
|
32378
32331
|
["es2022.regexp", "lib.es2022.regexp.d.ts"],
|
|
32379
|
-
["
|
|
32332
|
+
["es2023.array", "lib.es2023.array.d.ts"],
|
|
32333
|
+
["esnext.array", "lib.es2023.array.d.ts"],
|
|
32380
32334
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
32381
32335
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
32382
32336
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
@@ -35561,7 +35515,7 @@ function resolvedTypeScriptOnly(resolved) {
|
|
|
35561
35515
|
Debug.assert(extensionIsTS(resolved.extension));
|
|
35562
35516
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
35563
35517
|
}
|
|
35564
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
|
|
35518
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
|
|
35565
35519
|
if (resultFromCache) {
|
|
35566
35520
|
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
35567
35521
|
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
@@ -35579,7 +35533,8 @@ function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibra
|
|
|
35579
35533
|
},
|
|
35580
35534
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
35581
35535
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
35582
|
-
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
35536
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
|
35537
|
+
node10Result: legacyResult
|
|
35583
35538
|
};
|
|
35584
35539
|
}
|
|
35585
35540
|
function initializeResolutionField(value) {
|
|
@@ -36609,7 +36564,7 @@ function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
|
36609
36564
|
);
|
|
36610
36565
|
}
|
|
36611
36566
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
36612
|
-
var _a2, _b;
|
|
36567
|
+
var _a2, _b, _c, _d;
|
|
36613
36568
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36614
36569
|
const failedLookupLocations = [];
|
|
36615
36570
|
const affectingLocations = [];
|
|
@@ -36636,44 +36591,60 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
36636
36591
|
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
|
|
36637
36592
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
36638
36593
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
36639
|
-
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
36594
|
+
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
36640
36595
|
} else {
|
|
36641
|
-
result = tryResolve(extensions);
|
|
36596
|
+
result = tryResolve(extensions, state);
|
|
36597
|
+
}
|
|
36598
|
+
let legacyResult;
|
|
36599
|
+
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) {
|
|
36600
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
36601
|
+
const diagnosticState = {
|
|
36602
|
+
...state,
|
|
36603
|
+
features: state.features & ~8 /* Exports */,
|
|
36604
|
+
failedLookupLocations: [],
|
|
36605
|
+
affectingLocations: [],
|
|
36606
|
+
reportDiagnostic: noop
|
|
36607
|
+
};
|
|
36608
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
36609
|
+
if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
|
|
36610
|
+
legacyResult = diagnosticResult.value.resolved.path;
|
|
36611
|
+
}
|
|
36642
36612
|
}
|
|
36643
36613
|
return createResolvedModuleWithFailedLookupLocations(
|
|
36644
|
-
(
|
|
36645
|
-
(
|
|
36614
|
+
(_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved,
|
|
36615
|
+
(_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport,
|
|
36646
36616
|
failedLookupLocations,
|
|
36647
36617
|
affectingLocations,
|
|
36648
36618
|
diagnostics,
|
|
36649
|
-
state.resultFromCache
|
|
36619
|
+
state.resultFromCache,
|
|
36620
|
+
legacyResult
|
|
36650
36621
|
);
|
|
36651
|
-
function tryResolve(extensions2) {
|
|
36652
|
-
const loader = (extensions3, candidate, onlyRecordFailures,
|
|
36622
|
+
function tryResolve(extensions2, state2) {
|
|
36623
|
+
const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
|
|
36653
36624
|
extensions3,
|
|
36654
36625
|
candidate,
|
|
36655
36626
|
onlyRecordFailures,
|
|
36656
|
-
|
|
36627
|
+
state3,
|
|
36657
36628
|
/*considerPackageJson*/
|
|
36658
36629
|
true
|
|
36659
36630
|
);
|
|
36660
|
-
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader,
|
|
36631
|
+
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);
|
|
36661
36632
|
if (resolved) {
|
|
36662
36633
|
return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
|
|
36663
36634
|
}
|
|
36664
36635
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
36665
36636
|
let resolved2;
|
|
36666
36637
|
if (features & 2 /* Imports */ && startsWith(moduleName, "#")) {
|
|
36667
|
-
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory,
|
|
36638
|
+
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36668
36639
|
}
|
|
36669
36640
|
if (!resolved2 && features & 4 /* SelfName */) {
|
|
36670
|
-
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory,
|
|
36641
|
+
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36671
36642
|
}
|
|
36672
36643
|
if (!resolved2) {
|
|
36673
36644
|
if (traceEnabled) {
|
|
36674
36645
|
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
36675
36646
|
}
|
|
36676
|
-
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory,
|
|
36647
|
+
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36677
36648
|
}
|
|
36678
36649
|
if (!resolved2)
|
|
36679
36650
|
return void 0;
|
|
@@ -36692,7 +36663,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
36692
36663
|
candidate,
|
|
36693
36664
|
/*onlyRecordFailures*/
|
|
36694
36665
|
false,
|
|
36695
|
-
|
|
36666
|
+
state2,
|
|
36696
36667
|
/*considerPackageJson*/
|
|
36697
36668
|
true
|
|
36698
36669
|
);
|
|
@@ -37925,7 +37896,7 @@ function getModuleInstanceStateWorker(node, visited) {
|
|
|
37925
37896
|
case 264 /* ModuleDeclaration */:
|
|
37926
37897
|
return getModuleInstanceState(node, visited);
|
|
37927
37898
|
case 79 /* Identifier */:
|
|
37928
|
-
if (node.
|
|
37899
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
37929
37900
|
return 0 /* NonInstantiated */;
|
|
37930
37901
|
}
|
|
37931
37902
|
}
|
|
@@ -38362,6 +38333,7 @@ function createBinder() {
|
|
|
38362
38333
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
38363
38334
|
seenThisKeyword = false;
|
|
38364
38335
|
bindChildren(node);
|
|
38336
|
+
Debug.assertNotNode(node, isIdentifier);
|
|
38365
38337
|
node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */;
|
|
38366
38338
|
} else {
|
|
38367
38339
|
bindChildren(node);
|
|
@@ -39521,13 +39493,14 @@ function createBinder() {
|
|
|
39521
39493
|
}
|
|
39522
39494
|
function checkContextualIdentifier(node) {
|
|
39523
39495
|
if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
|
|
39524
|
-
|
|
39496
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
39497
|
+
if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
|
|
39525
39498
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39526
39499
|
node,
|
|
39527
39500
|
getStrictModeIdentifierMessage(node),
|
|
39528
39501
|
declarationNameToString(node)
|
|
39529
39502
|
));
|
|
39530
|
-
} else if (
|
|
39503
|
+
} else if (originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
39531
39504
|
if (isExternalModule(file) && isInTopLevelContext(node)) {
|
|
39532
39505
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39533
39506
|
node,
|
|
@@ -39541,7 +39514,7 @@ function createBinder() {
|
|
|
39541
39514
|
declarationNameToString(node)
|
|
39542
39515
|
));
|
|
39543
39516
|
}
|
|
39544
|
-
} else if (
|
|
39517
|
+
} else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
|
|
39545
39518
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39546
39519
|
node,
|
|
39547
39520
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,
|
|
@@ -39753,7 +39726,7 @@ function createBinder() {
|
|
|
39753
39726
|
function bindWorker(node) {
|
|
39754
39727
|
switch (node.kind) {
|
|
39755
39728
|
case 79 /* Identifier */:
|
|
39756
|
-
if (node.
|
|
39729
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
39757
39730
|
let parentNode = node.parent;
|
|
39758
39731
|
while (parentNode && !isJSDocTypeAlias(parentNode)) {
|
|
39759
39732
|
parentNode = parentNode.parent;
|
|
@@ -44767,6 +44740,8 @@ function createTypeChecker(host) {
|
|
|
44767
44740
|
/*isError*/
|
|
44768
44741
|
false,
|
|
44769
44742
|
errorNode,
|
|
44743
|
+
currentSourceFile,
|
|
44744
|
+
mode,
|
|
44770
44745
|
resolvedModule,
|
|
44771
44746
|
moduleReference
|
|
44772
44747
|
);
|
|
@@ -44852,6 +44827,8 @@ function createTypeChecker(host) {
|
|
|
44852
44827
|
/*isError*/
|
|
44853
44828
|
noImplicitAny && !!moduleNotFoundError,
|
|
44854
44829
|
errorNode,
|
|
44830
|
+
currentSourceFile,
|
|
44831
|
+
mode,
|
|
44855
44832
|
resolvedModule,
|
|
44856
44833
|
moduleReference
|
|
44857
44834
|
);
|
|
@@ -44906,26 +44883,37 @@ function createTypeChecker(host) {
|
|
|
44906
44883
|
return importSourceWithoutExtension;
|
|
44907
44884
|
}
|
|
44908
44885
|
}
|
|
44909
|
-
function errorOnImplicitAnyModule(isError, errorNode, { packageId, resolvedFileName }, moduleReference) {
|
|
44910
|
-
|
|
44911
|
-
|
|
44912
|
-
|
|
44913
|
-
|
|
44914
|
-
|
|
44915
|
-
|
|
44916
|
-
|
|
44917
|
-
|
|
44918
|
-
|
|
44919
|
-
|
|
44920
|
-
packageId.name
|
|
44921
|
-
|
|
44922
|
-
|
|
44923
|
-
|
|
44924
|
-
|
|
44925
|
-
|
|
44926
|
-
|
|
44927
|
-
|
|
44928
|
-
|
|
44886
|
+
function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {
|
|
44887
|
+
var _a2, _b;
|
|
44888
|
+
let errorInfo;
|
|
44889
|
+
if (!isExternalModuleNameRelative(moduleReference) && packageId) {
|
|
44890
|
+
const node10Result = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleReference, mode)) == null ? void 0 : _b.node10Result;
|
|
44891
|
+
errorInfo = node10Result ? chainDiagnosticMessages(
|
|
44892
|
+
/*details*/
|
|
44893
|
+
void 0,
|
|
44894
|
+
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,
|
|
44895
|
+
node10Result,
|
|
44896
|
+
node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name
|
|
44897
|
+
) : typesPackageExists(packageId.name) ? chainDiagnosticMessages(
|
|
44898
|
+
/*details*/
|
|
44899
|
+
void 0,
|
|
44900
|
+
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,
|
|
44901
|
+
packageId.name,
|
|
44902
|
+
mangleScopedPackageName(packageId.name)
|
|
44903
|
+
) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
|
|
44904
|
+
/*details*/
|
|
44905
|
+
void 0,
|
|
44906
|
+
Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
|
|
44907
|
+
packageId.name,
|
|
44908
|
+
moduleReference
|
|
44909
|
+
) : chainDiagnosticMessages(
|
|
44910
|
+
/*details*/
|
|
44911
|
+
void 0,
|
|
44912
|
+
Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
|
44913
|
+
moduleReference,
|
|
44914
|
+
mangleScopedPackageName(packageId.name)
|
|
44915
|
+
);
|
|
44916
|
+
}
|
|
44929
44917
|
errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
|
|
44930
44918
|
errorInfo,
|
|
44931
44919
|
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
|
@@ -46582,13 +46570,17 @@ function createTypeChecker(host) {
|
|
|
46582
46570
|
let qualifier = root.qualifier;
|
|
46583
46571
|
if (qualifier) {
|
|
46584
46572
|
if (isIdentifier(qualifier)) {
|
|
46585
|
-
|
|
46573
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier)) {
|
|
46574
|
+
qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);
|
|
46575
|
+
}
|
|
46586
46576
|
} else {
|
|
46587
|
-
|
|
46588
|
-
qualifier
|
|
46589
|
-
|
|
46590
|
-
|
|
46591
|
-
|
|
46577
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {
|
|
46578
|
+
qualifier = factory.updateQualifiedName(
|
|
46579
|
+
qualifier,
|
|
46580
|
+
qualifier.left,
|
|
46581
|
+
setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)
|
|
46582
|
+
);
|
|
46583
|
+
}
|
|
46592
46584
|
}
|
|
46593
46585
|
}
|
|
46594
46586
|
typeArguments = ref.typeArguments;
|
|
@@ -46608,13 +46600,17 @@ function createTypeChecker(host) {
|
|
|
46608
46600
|
let typeArguments = root.typeArguments;
|
|
46609
46601
|
let typeName = root.typeName;
|
|
46610
46602
|
if (isIdentifier(typeName)) {
|
|
46611
|
-
|
|
46603
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName)) {
|
|
46604
|
+
typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);
|
|
46605
|
+
}
|
|
46612
46606
|
} else {
|
|
46613
|
-
|
|
46614
|
-
typeName
|
|
46615
|
-
|
|
46616
|
-
|
|
46617
|
-
|
|
46607
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {
|
|
46608
|
+
typeName = factory.updateQualifiedName(
|
|
46609
|
+
typeName,
|
|
46610
|
+
typeName.left,
|
|
46611
|
+
setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)
|
|
46612
|
+
);
|
|
46613
|
+
}
|
|
46618
46614
|
}
|
|
46619
46615
|
typeArguments = ref.typeArguments;
|
|
46620
46616
|
const ids = getAccessStack(ref);
|
|
@@ -47328,7 +47324,11 @@ function createTypeChecker(host) {
|
|
|
47328
47324
|
if (!nonRootParts || isEntityName(nonRootParts)) {
|
|
47329
47325
|
if (nonRootParts) {
|
|
47330
47326
|
const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
47331
|
-
|
|
47327
|
+
setIdentifierTypeArguments(
|
|
47328
|
+
lastId,
|
|
47329
|
+
/*typeArguments*/
|
|
47330
|
+
void 0
|
|
47331
|
+
);
|
|
47332
47332
|
}
|
|
47333
47333
|
return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
47334
47334
|
} else {
|
|
@@ -47345,8 +47345,12 @@ function createTypeChecker(host) {
|
|
|
47345
47345
|
return factory.createTypeQueryNode(entityName);
|
|
47346
47346
|
} else {
|
|
47347
47347
|
const lastId = isIdentifier(entityName) ? entityName : entityName.right;
|
|
47348
|
-
const lastTypeArgs = lastId
|
|
47349
|
-
|
|
47348
|
+
const lastTypeArgs = getIdentifierTypeArguments(lastId);
|
|
47349
|
+
setIdentifierTypeArguments(
|
|
47350
|
+
lastId,
|
|
47351
|
+
/*typeArguments*/
|
|
47352
|
+
void 0
|
|
47353
|
+
);
|
|
47350
47354
|
return factory.createTypeReferenceNode(entityName, lastTypeArgs);
|
|
47351
47355
|
}
|
|
47352
47356
|
function createAccessFromSymbolChain(chain2, index, stopper) {
|
|
@@ -47390,7 +47394,9 @@ function createTypeChecker(host) {
|
|
|
47390
47394
|
return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
|
|
47391
47395
|
}
|
|
47392
47396
|
}
|
|
47393
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47397
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47398
|
+
if (typeParameterNodes)
|
|
47399
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47394
47400
|
identifier.symbol = symbol2;
|
|
47395
47401
|
if (index > stopper) {
|
|
47396
47402
|
const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);
|
|
@@ -47448,7 +47454,9 @@ function createTypeChecker(host) {
|
|
|
47448
47454
|
text = `${rawtext}_${i}`;
|
|
47449
47455
|
}
|
|
47450
47456
|
if (text !== rawtext) {
|
|
47451
|
-
|
|
47457
|
+
const typeArguments = getIdentifierTypeArguments(result);
|
|
47458
|
+
result = factory.createIdentifier(text);
|
|
47459
|
+
setIdentifierTypeArguments(result, typeArguments);
|
|
47452
47460
|
}
|
|
47453
47461
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
47454
47462
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
@@ -47472,7 +47480,9 @@ function createTypeChecker(host) {
|
|
|
47472
47480
|
if (index === 0) {
|
|
47473
47481
|
context.flags ^= 16777216 /* InInitialEntityName */;
|
|
47474
47482
|
}
|
|
47475
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47483
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47484
|
+
if (typeParameterNodes)
|
|
47485
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47476
47486
|
identifier.symbol = symbol2;
|
|
47477
47487
|
return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
47478
47488
|
}
|
|
@@ -47495,7 +47505,9 @@ function createTypeChecker(host) {
|
|
|
47495
47505
|
return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
|
|
47496
47506
|
}
|
|
47497
47507
|
if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
47498
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47508
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47509
|
+
if (typeParameterNodes)
|
|
47510
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47499
47511
|
identifier.symbol = symbol2;
|
|
47500
47512
|
return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
47501
47513
|
} else {
|
|
@@ -47510,8 +47522,11 @@ function createTypeChecker(host) {
|
|
|
47510
47522
|
expression = factory.createNumericLiteral(+symbolName2);
|
|
47511
47523
|
}
|
|
47512
47524
|
if (!expression) {
|
|
47513
|
-
|
|
47514
|
-
|
|
47525
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47526
|
+
if (typeParameterNodes)
|
|
47527
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47528
|
+
identifier.symbol = symbol2;
|
|
47529
|
+
expression = identifier;
|
|
47515
47530
|
}
|
|
47516
47531
|
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);
|
|
47517
47532
|
}
|
|
@@ -52341,7 +52356,7 @@ function createTypeChecker(host) {
|
|
|
52341
52356
|
}
|
|
52342
52357
|
function isConstTypeVariable(type) {
|
|
52343
52358
|
var _a2;
|
|
52344
|
-
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
52359
|
+
return !!(type.flags & 262144 /* TypeParameter */ && some((_a2 = type.symbol) == null ? void 0 : _a2.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || isGenericTupleType(type) && findIndex(getTypeArguments(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0 || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType));
|
|
52345
52360
|
}
|
|
52346
52361
|
function getConstraintOfIndexedAccess(type) {
|
|
52347
52362
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -61026,19 +61041,22 @@ function createTypeChecker(host) {
|
|
|
61026
61041
|
break;
|
|
61027
61042
|
case 166 /* Parameter */:
|
|
61028
61043
|
const param = declaration;
|
|
61029
|
-
if (isIdentifier(param.name)
|
|
61030
|
-
param
|
|
61031
|
-
param.
|
|
61032
|
-
|
|
61033
|
-
|
|
61034
|
-
|
|
61035
|
-
|
|
61036
|
-
|
|
61037
|
-
|
|
61038
|
-
|
|
61039
|
-
|
|
61040
|
-
|
|
61041
|
-
|
|
61044
|
+
if (isIdentifier(param.name)) {
|
|
61045
|
+
const originalKeywordKind = identifierToKeywordKind(param.name);
|
|
61046
|
+
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
|
|
61047
|
+
param,
|
|
61048
|
+
param.name.escapedText,
|
|
61049
|
+
788968 /* Type */,
|
|
61050
|
+
void 0,
|
|
61051
|
+
param.name.escapedText,
|
|
61052
|
+
/*isUse*/
|
|
61053
|
+
true
|
|
61054
|
+
) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {
|
|
61055
|
+
const newName = "arg" + param.parent.parameters.indexOf(param);
|
|
61056
|
+
const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
61057
|
+
errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
61058
|
+
return;
|
|
61059
|
+
}
|
|
61042
61060
|
}
|
|
61043
61061
|
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;
|
|
61044
61062
|
break;
|
|
@@ -61226,6 +61244,10 @@ function createTypeChecker(host) {
|
|
|
61226
61244
|
function isTypeParameterAtTopLevel(type, typeParameter) {
|
|
61227
61245
|
return !!(type === typeParameter || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isTypeParameterAtTopLevel(t, typeParameter)) || type.flags & 16777216 /* Conditional */ && (getTrueTypeFromConditionalType(type) === typeParameter || getFalseTypeFromConditionalType(type) === typeParameter));
|
|
61228
61246
|
}
|
|
61247
|
+
function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {
|
|
61248
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
61249
|
+
return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);
|
|
61250
|
+
}
|
|
61229
61251
|
function createEmptyObjectTypeFromStringLiteral(type) {
|
|
61230
61252
|
const members = createSymbolTable();
|
|
61231
61253
|
forEachType(type, (t) => {
|
|
@@ -62097,7 +62119,7 @@ function createTypeChecker(host) {
|
|
|
62097
62119
|
function getCovariantInference(inference, signature) {
|
|
62098
62120
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
62099
62121
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
62100
|
-
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !
|
|
62122
|
+
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
62101
62123
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
62102
62124
|
const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
62103
62125
|
return getWidenedType(unwidenedType);
|
|
@@ -64250,6 +64272,7 @@ function createTypeChecker(host) {
|
|
|
64250
64272
|
}
|
|
64251
64273
|
}
|
|
64252
64274
|
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
64275
|
+
var _a2;
|
|
64253
64276
|
const type = getTypeOfSymbol(symbol);
|
|
64254
64277
|
const declaration = symbol.valueDeclaration;
|
|
64255
64278
|
if (declaration) {
|
|
@@ -64285,7 +64308,7 @@ function createTypeChecker(host) {
|
|
|
64285
64308
|
if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
|
|
64286
64309
|
const contextualSignature = getContextualSignature(func);
|
|
64287
64310
|
if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) {
|
|
64288
|
-
const restType = getReducedApparentType(getTypeOfSymbol(contextualSignature.parameters[0]));
|
|
64311
|
+
const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a2 = getInferenceContext(func)) == null ? void 0 : _a2.nonFixingMapper));
|
|
64289
64312
|
if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) {
|
|
64290
64313
|
const narrowedType = getFlowTypeOfReference(
|
|
64291
64314
|
func,
|
|
@@ -65506,7 +65529,9 @@ function createTypeChecker(host) {
|
|
|
65506
65529
|
}
|
|
65507
65530
|
const index = findContextualNode(node);
|
|
65508
65531
|
if (index >= 0) {
|
|
65509
|
-
|
|
65532
|
+
const cached = contextualTypes[index];
|
|
65533
|
+
if (cached || !contextFlags)
|
|
65534
|
+
return cached;
|
|
65510
65535
|
}
|
|
65511
65536
|
const { parent } = node;
|
|
65512
65537
|
switch (parent.kind) {
|
|
@@ -72826,8 +72851,11 @@ function createTypeChecker(host) {
|
|
|
72826
72851
|
}
|
|
72827
72852
|
function checkTypeReferenceNode(node) {
|
|
72828
72853
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
72829
|
-
if (node.kind === 180 /* TypeReference */ &&
|
|
72830
|
-
|
|
72854
|
+
if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
72855
|
+
const sourceFile = getSourceFileOfNode(node);
|
|
72856
|
+
if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) {
|
|
72857
|
+
grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
|
|
72858
|
+
}
|
|
72831
72859
|
}
|
|
72832
72860
|
forEach(node.typeArguments, checkSourceElement);
|
|
72833
72861
|
const type = getTypeFromTypeReference(node);
|
|
@@ -78436,8 +78464,9 @@ function createTypeChecker(host) {
|
|
|
78436
78464
|
}
|
|
78437
78465
|
}
|
|
78438
78466
|
function getReferencedImportDeclaration(nodeIn) {
|
|
78439
|
-
|
|
78440
|
-
|
|
78467
|
+
const specifier = getIdentifierGeneratedImportReference(nodeIn);
|
|
78468
|
+
if (specifier) {
|
|
78469
|
+
return specifier;
|
|
78441
78470
|
}
|
|
78442
78471
|
const node = getParseTreeNode(nodeIn, isIdentifier);
|
|
78443
78472
|
if (node) {
|
|
@@ -80415,7 +80444,7 @@ function createTypeChecker(host) {
|
|
|
80415
80444
|
}
|
|
80416
80445
|
function checkGrammarNameInLetOrConstDeclarations(name) {
|
|
80417
80446
|
if (name.kind === 79 /* Identifier */) {
|
|
80418
|
-
if (name.
|
|
80447
|
+
if (name.escapedText === "let") {
|
|
80419
80448
|
return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
|
|
80420
80449
|
}
|
|
80421
80450
|
} else {
|
|
@@ -81219,12 +81248,6 @@ function visitEachChild(node, visitor, context, nodesVisitor = visitNodes2, toke
|
|
|
81219
81248
|
return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor);
|
|
81220
81249
|
}
|
|
81221
81250
|
var visitEachChildTable = {
|
|
81222
|
-
[79 /* Identifier */]: function visitEachChildOfIdentifier(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
81223
|
-
return context.factory.updateIdentifier(
|
|
81224
|
-
node,
|
|
81225
|
-
nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration)
|
|
81226
|
-
);
|
|
81227
|
-
},
|
|
81228
81251
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81229
81252
|
return context.factory.updateQualifiedName(
|
|
81230
81253
|
node,
|
|
@@ -86260,7 +86283,7 @@ function transformClassFields(context) {
|
|
|
86260
86283
|
if (isClassWithConstructorReference) {
|
|
86261
86284
|
enableSubstitutionForClassAliases();
|
|
86262
86285
|
const alias = factory2.cloneNode(temp);
|
|
86263
|
-
alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
86286
|
+
alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
86264
86287
|
classAliases[getOriginalNodeId(node)] = alias;
|
|
86265
86288
|
}
|
|
86266
86289
|
setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
|
|
@@ -90396,7 +90419,7 @@ function transformJsx(context) {
|
|
|
90396
90419
|
factory2.createIdentifier(name),
|
|
90397
90420
|
generatedName
|
|
90398
90421
|
);
|
|
90399
|
-
generatedName
|
|
90422
|
+
setIdentifierGeneratedImportReference(generatedName, specifier);
|
|
90400
90423
|
specifierSourceImports.set(name, specifier);
|
|
90401
90424
|
return generatedName;
|
|
90402
90425
|
}
|
|
@@ -91539,7 +91562,7 @@ function transformES2015(context) {
|
|
|
91539
91562
|
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
|
|
91540
91563
|
}
|
|
91541
91564
|
}
|
|
91542
|
-
if (node.
|
|
91565
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
91543
91566
|
return setOriginalNode(setTextRange(
|
|
91544
91567
|
factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),
|
|
91545
91568
|
node
|
|
@@ -94420,7 +94443,7 @@ function transformES5(context) {
|
|
|
94420
94443
|
return node;
|
|
94421
94444
|
}
|
|
94422
94445
|
function trySubstituteReservedName(name) {
|
|
94423
|
-
const token =
|
|
94446
|
+
const token = identifierToKeywordKind(name);
|
|
94424
94447
|
if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) {
|
|
94425
94448
|
return setTextRange(factory2.createStringLiteralFromNode(name), name);
|
|
94426
94449
|
}
|
|
@@ -98088,7 +98111,7 @@ function transformModule(context) {
|
|
|
98088
98111
|
return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
|
|
98089
98112
|
}
|
|
98090
98113
|
return node;
|
|
98091
|
-
} else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
98114
|
+
} else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
98092
98115
|
const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
|
|
98093
98116
|
if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
|
|
98094
98117
|
return setTextRange(
|
|
@@ -104041,7 +104064,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
104041
104064
|
/*includeTrivia*/
|
|
104042
104065
|
false
|
|
104043
104066
|
), node.symbol);
|
|
104044
|
-
emitList(node, node
|
|
104067
|
+
emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);
|
|
104045
104068
|
}
|
|
104046
104069
|
function emitPrivateIdentifier(node) {
|
|
104047
104070
|
write(getTextOfNode2(
|
|
@@ -106759,10 +106782,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
106759
106782
|
}
|
|
106760
106783
|
}
|
|
106761
106784
|
function generateName(name) {
|
|
106762
|
-
|
|
106763
|
-
|
|
106785
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
106786
|
+
if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
|
|
106787
|
+
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);
|
|
106764
106788
|
} else {
|
|
106765
|
-
const autoGenerateId =
|
|
106789
|
+
const autoGenerateId = autoGenerate.id;
|
|
106766
106790
|
return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
|
|
106767
106791
|
}
|
|
106768
106792
|
}
|
|
@@ -107042,16 +107066,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107042
107066
|
}
|
|
107043
107067
|
}
|
|
107044
107068
|
function makeName(name) {
|
|
107045
|
-
const
|
|
107046
|
-
const
|
|
107047
|
-
|
|
107069
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
107070
|
+
const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);
|
|
107071
|
+
const suffix = formatGeneratedNamePart(autoGenerate.suffix);
|
|
107072
|
+
switch (autoGenerate.flags & 7 /* KindMask */) {
|
|
107048
107073
|
case 1 /* Auto */:
|
|
107049
|
-
return makeTempVariableName(TempFlags.Auto, !!(
|
|
107074
|
+
return makeTempVariableName(TempFlags.Auto, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
|
|
107050
107075
|
case 2 /* Loop */:
|
|
107051
107076
|
Debug.assertNode(name, isIdentifier);
|
|
107052
107077
|
return makeTempVariableName(
|
|
107053
107078
|
TempFlags._i,
|
|
107054
|
-
!!(
|
|
107079
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
107055
107080
|
/*privateName*/
|
|
107056
107081
|
false,
|
|
107057
107082
|
prefix,
|
|
@@ -107060,16 +107085,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107060
107085
|
case 3 /* Unique */:
|
|
107061
107086
|
return makeUniqueName(
|
|
107062
107087
|
idText(name),
|
|
107063
|
-
|
|
107064
|
-
!!(
|
|
107065
|
-
!!(
|
|
107088
|
+
autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
|
|
107089
|
+
!!(autoGenerate.flags & 16 /* Optimistic */),
|
|
107090
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
107066
107091
|
isPrivateIdentifier(name),
|
|
107067
107092
|
prefix,
|
|
107068
107093
|
suffix
|
|
107069
107094
|
);
|
|
107070
107095
|
}
|
|
107071
107096
|
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(
|
|
107072
|
-
|
|
107097
|
+
autoGenerate.flags & 7 /* KindMask */,
|
|
107073
107098
|
GeneratedIdentifierFlags,
|
|
107074
107099
|
/*isFlags*/
|
|
107075
107100
|
true
|