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/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.20230113`;
|
|
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
|
}
|
|
@@ -35561,7 +35513,7 @@ function resolvedTypeScriptOnly(resolved) {
|
|
|
35561
35513
|
Debug.assert(extensionIsTS(resolved.extension));
|
|
35562
35514
|
return { fileName: resolved.path, packageId: resolved.packageId };
|
|
35563
35515
|
}
|
|
35564
|
-
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
|
|
35516
|
+
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) {
|
|
35565
35517
|
if (resultFromCache) {
|
|
35566
35518
|
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
35567
35519
|
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
@@ -35579,7 +35531,8 @@ function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibra
|
|
|
35579
35531
|
},
|
|
35580
35532
|
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
35581
35533
|
affectingLocations: initializeResolutionField(affectingLocations),
|
|
35582
|
-
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
35534
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics),
|
|
35535
|
+
node10Result: legacyResult
|
|
35583
35536
|
};
|
|
35584
35537
|
}
|
|
35585
35538
|
function initializeResolutionField(value) {
|
|
@@ -36609,7 +36562,7 @@ function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
|
36609
36562
|
);
|
|
36610
36563
|
}
|
|
36611
36564
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
36612
|
-
var _a2, _b;
|
|
36565
|
+
var _a2, _b, _c, _d;
|
|
36613
36566
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
36614
36567
|
const failedLookupLocations = [];
|
|
36615
36568
|
const affectingLocations = [];
|
|
@@ -36636,44 +36589,60 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
36636
36589
|
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) {
|
|
36637
36590
|
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
36638
36591
|
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
36639
|
-
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
36592
|
+
result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0;
|
|
36640
36593
|
} else {
|
|
36641
|
-
result = tryResolve(extensions);
|
|
36594
|
+
result = tryResolve(extensions, state);
|
|
36595
|
+
}
|
|
36596
|
+
let legacyResult;
|
|
36597
|
+
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) {
|
|
36598
|
+
traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update);
|
|
36599
|
+
const diagnosticState = {
|
|
36600
|
+
...state,
|
|
36601
|
+
features: state.features & ~8 /* Exports */,
|
|
36602
|
+
failedLookupLocations: [],
|
|
36603
|
+
affectingLocations: [],
|
|
36604
|
+
reportDiagnostic: noop
|
|
36605
|
+
};
|
|
36606
|
+
const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState);
|
|
36607
|
+
if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) {
|
|
36608
|
+
legacyResult = diagnosticResult.value.resolved.path;
|
|
36609
|
+
}
|
|
36642
36610
|
}
|
|
36643
36611
|
return createResolvedModuleWithFailedLookupLocations(
|
|
36644
|
-
(
|
|
36645
|
-
(
|
|
36612
|
+
(_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved,
|
|
36613
|
+
(_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport,
|
|
36646
36614
|
failedLookupLocations,
|
|
36647
36615
|
affectingLocations,
|
|
36648
36616
|
diagnostics,
|
|
36649
|
-
state.resultFromCache
|
|
36617
|
+
state.resultFromCache,
|
|
36618
|
+
legacyResult
|
|
36650
36619
|
);
|
|
36651
|
-
function tryResolve(extensions2) {
|
|
36652
|
-
const loader = (extensions3, candidate, onlyRecordFailures,
|
|
36620
|
+
function tryResolve(extensions2, state2) {
|
|
36621
|
+
const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName(
|
|
36653
36622
|
extensions3,
|
|
36654
36623
|
candidate,
|
|
36655
36624
|
onlyRecordFailures,
|
|
36656
|
-
|
|
36625
|
+
state3,
|
|
36657
36626
|
/*considerPackageJson*/
|
|
36658
36627
|
true
|
|
36659
36628
|
);
|
|
36660
|
-
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader,
|
|
36629
|
+
const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2);
|
|
36661
36630
|
if (resolved) {
|
|
36662
36631
|
return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
|
|
36663
36632
|
}
|
|
36664
36633
|
if (!isExternalModuleNameRelative(moduleName)) {
|
|
36665
36634
|
let resolved2;
|
|
36666
36635
|
if (features & 2 /* Imports */ && startsWith(moduleName, "#")) {
|
|
36667
|
-
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory,
|
|
36636
|
+
resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36668
36637
|
}
|
|
36669
36638
|
if (!resolved2 && features & 4 /* SelfName */) {
|
|
36670
|
-
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory,
|
|
36639
|
+
resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36671
36640
|
}
|
|
36672
36641
|
if (!resolved2) {
|
|
36673
36642
|
if (traceEnabled) {
|
|
36674
36643
|
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
36675
36644
|
}
|
|
36676
|
-
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory,
|
|
36645
|
+
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference);
|
|
36677
36646
|
}
|
|
36678
36647
|
if (!resolved2)
|
|
36679
36648
|
return void 0;
|
|
@@ -36692,7 +36661,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory,
|
|
|
36692
36661
|
candidate,
|
|
36693
36662
|
/*onlyRecordFailures*/
|
|
36694
36663
|
false,
|
|
36695
|
-
|
|
36664
|
+
state2,
|
|
36696
36665
|
/*considerPackageJson*/
|
|
36697
36666
|
true
|
|
36698
36667
|
);
|
|
@@ -37925,7 +37894,7 @@ function getModuleInstanceStateWorker(node, visited) {
|
|
|
37925
37894
|
case 264 /* ModuleDeclaration */:
|
|
37926
37895
|
return getModuleInstanceState(node, visited);
|
|
37927
37896
|
case 79 /* Identifier */:
|
|
37928
|
-
if (node.
|
|
37897
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
37929
37898
|
return 0 /* NonInstantiated */;
|
|
37930
37899
|
}
|
|
37931
37900
|
}
|
|
@@ -38362,6 +38331,7 @@ function createBinder() {
|
|
|
38362
38331
|
} else if (containerFlags & 64 /* IsInterface */) {
|
|
38363
38332
|
seenThisKeyword = false;
|
|
38364
38333
|
bindChildren(node);
|
|
38334
|
+
Debug.assertNotNode(node, isIdentifier);
|
|
38365
38335
|
node.flags = seenThisKeyword ? node.flags | 128 /* ContainsThis */ : node.flags & ~128 /* ContainsThis */;
|
|
38366
38336
|
} else {
|
|
38367
38337
|
bindChildren(node);
|
|
@@ -39521,13 +39491,14 @@ function createBinder() {
|
|
|
39521
39491
|
}
|
|
39522
39492
|
function checkContextualIdentifier(node) {
|
|
39523
39493
|
if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
|
|
39524
|
-
|
|
39494
|
+
const originalKeywordKind = identifierToKeywordKind(node);
|
|
39495
|
+
if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
|
|
39525
39496
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39526
39497
|
node,
|
|
39527
39498
|
getStrictModeIdentifierMessage(node),
|
|
39528
39499
|
declarationNameToString(node)
|
|
39529
39500
|
));
|
|
39530
|
-
} else if (
|
|
39501
|
+
} else if (originalKeywordKind === 133 /* AwaitKeyword */) {
|
|
39531
39502
|
if (isExternalModule(file) && isInTopLevelContext(node)) {
|
|
39532
39503
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39533
39504
|
node,
|
|
@@ -39541,7 +39512,7 @@ function createBinder() {
|
|
|
39541
39512
|
declarationNameToString(node)
|
|
39542
39513
|
));
|
|
39543
39514
|
}
|
|
39544
|
-
} else if (
|
|
39515
|
+
} else if (originalKeywordKind === 125 /* YieldKeyword */ && node.flags & 8192 /* YieldContext */) {
|
|
39545
39516
|
file.bindDiagnostics.push(createDiagnosticForNode2(
|
|
39546
39517
|
node,
|
|
39547
39518
|
Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,
|
|
@@ -39753,7 +39724,7 @@ function createBinder() {
|
|
|
39753
39724
|
function bindWorker(node) {
|
|
39754
39725
|
switch (node.kind) {
|
|
39755
39726
|
case 79 /* Identifier */:
|
|
39756
|
-
if (node.
|
|
39727
|
+
if (node.flags & 2048 /* IdentifierIsInJSDocNamespace */) {
|
|
39757
39728
|
let parentNode = node.parent;
|
|
39758
39729
|
while (parentNode && !isJSDocTypeAlias(parentNode)) {
|
|
39759
39730
|
parentNode = parentNode.parent;
|
|
@@ -44767,6 +44738,8 @@ function createTypeChecker(host) {
|
|
|
44767
44738
|
/*isError*/
|
|
44768
44739
|
false,
|
|
44769
44740
|
errorNode,
|
|
44741
|
+
currentSourceFile,
|
|
44742
|
+
mode,
|
|
44770
44743
|
resolvedModule,
|
|
44771
44744
|
moduleReference
|
|
44772
44745
|
);
|
|
@@ -44852,6 +44825,8 @@ function createTypeChecker(host) {
|
|
|
44852
44825
|
/*isError*/
|
|
44853
44826
|
noImplicitAny && !!moduleNotFoundError,
|
|
44854
44827
|
errorNode,
|
|
44828
|
+
currentSourceFile,
|
|
44829
|
+
mode,
|
|
44855
44830
|
resolvedModule,
|
|
44856
44831
|
moduleReference
|
|
44857
44832
|
);
|
|
@@ -44906,26 +44881,37 @@ function createTypeChecker(host) {
|
|
|
44906
44881
|
return importSourceWithoutExtension;
|
|
44907
44882
|
}
|
|
44908
44883
|
}
|
|
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
|
-
|
|
44884
|
+
function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) {
|
|
44885
|
+
var _a2, _b;
|
|
44886
|
+
let errorInfo;
|
|
44887
|
+
if (!isExternalModuleNameRelative(moduleReference) && packageId) {
|
|
44888
|
+
const node10Result = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleReference, mode)) == null ? void 0 : _b.node10Result;
|
|
44889
|
+
errorInfo = node10Result ? chainDiagnosticMessages(
|
|
44890
|
+
/*details*/
|
|
44891
|
+
void 0,
|
|
44892
|
+
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,
|
|
44893
|
+
node10Result,
|
|
44894
|
+
node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageId.name)}` : packageId.name
|
|
44895
|
+
) : typesPackageExists(packageId.name) ? chainDiagnosticMessages(
|
|
44896
|
+
/*details*/
|
|
44897
|
+
void 0,
|
|
44898
|
+
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,
|
|
44899
|
+
packageId.name,
|
|
44900
|
+
mangleScopedPackageName(packageId.name)
|
|
44901
|
+
) : packageBundlesTypes(packageId.name) ? chainDiagnosticMessages(
|
|
44902
|
+
/*details*/
|
|
44903
|
+
void 0,
|
|
44904
|
+
Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,
|
|
44905
|
+
packageId.name,
|
|
44906
|
+
moduleReference
|
|
44907
|
+
) : chainDiagnosticMessages(
|
|
44908
|
+
/*details*/
|
|
44909
|
+
void 0,
|
|
44910
|
+
Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
|
44911
|
+
moduleReference,
|
|
44912
|
+
mangleScopedPackageName(packageId.name)
|
|
44913
|
+
);
|
|
44914
|
+
}
|
|
44929
44915
|
errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
|
|
44930
44916
|
errorInfo,
|
|
44931
44917
|
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
|
@@ -46582,13 +46568,17 @@ function createTypeChecker(host) {
|
|
|
46582
46568
|
let qualifier = root.qualifier;
|
|
46583
46569
|
if (qualifier) {
|
|
46584
46570
|
if (isIdentifier(qualifier)) {
|
|
46585
|
-
|
|
46571
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier)) {
|
|
46572
|
+
qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments);
|
|
46573
|
+
}
|
|
46586
46574
|
} else {
|
|
46587
|
-
|
|
46588
|
-
qualifier
|
|
46589
|
-
|
|
46590
|
-
|
|
46591
|
-
|
|
46575
|
+
if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) {
|
|
46576
|
+
qualifier = factory.updateQualifiedName(
|
|
46577
|
+
qualifier,
|
|
46578
|
+
qualifier.left,
|
|
46579
|
+
setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)
|
|
46580
|
+
);
|
|
46581
|
+
}
|
|
46592
46582
|
}
|
|
46593
46583
|
}
|
|
46594
46584
|
typeArguments = ref.typeArguments;
|
|
@@ -46608,13 +46598,17 @@ function createTypeChecker(host) {
|
|
|
46608
46598
|
let typeArguments = root.typeArguments;
|
|
46609
46599
|
let typeName = root.typeName;
|
|
46610
46600
|
if (isIdentifier(typeName)) {
|
|
46611
|
-
|
|
46601
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName)) {
|
|
46602
|
+
typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments);
|
|
46603
|
+
}
|
|
46612
46604
|
} else {
|
|
46613
|
-
|
|
46614
|
-
typeName
|
|
46615
|
-
|
|
46616
|
-
|
|
46617
|
-
|
|
46605
|
+
if (typeArguments !== getIdentifierTypeArguments(typeName.right)) {
|
|
46606
|
+
typeName = factory.updateQualifiedName(
|
|
46607
|
+
typeName,
|
|
46608
|
+
typeName.left,
|
|
46609
|
+
setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)
|
|
46610
|
+
);
|
|
46611
|
+
}
|
|
46618
46612
|
}
|
|
46619
46613
|
typeArguments = ref.typeArguments;
|
|
46620
46614
|
const ids = getAccessStack(ref);
|
|
@@ -47328,7 +47322,11 @@ function createTypeChecker(host) {
|
|
|
47328
47322
|
if (!nonRootParts || isEntityName(nonRootParts)) {
|
|
47329
47323
|
if (nonRootParts) {
|
|
47330
47324
|
const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right;
|
|
47331
|
-
|
|
47325
|
+
setIdentifierTypeArguments(
|
|
47326
|
+
lastId,
|
|
47327
|
+
/*typeArguments*/
|
|
47328
|
+
void 0
|
|
47329
|
+
);
|
|
47332
47330
|
}
|
|
47333
47331
|
return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf);
|
|
47334
47332
|
} else {
|
|
@@ -47345,8 +47343,12 @@ function createTypeChecker(host) {
|
|
|
47345
47343
|
return factory.createTypeQueryNode(entityName);
|
|
47346
47344
|
} else {
|
|
47347
47345
|
const lastId = isIdentifier(entityName) ? entityName : entityName.right;
|
|
47348
|
-
const lastTypeArgs = lastId
|
|
47349
|
-
|
|
47346
|
+
const lastTypeArgs = getIdentifierTypeArguments(lastId);
|
|
47347
|
+
setIdentifierTypeArguments(
|
|
47348
|
+
lastId,
|
|
47349
|
+
/*typeArguments*/
|
|
47350
|
+
void 0
|
|
47351
|
+
);
|
|
47350
47352
|
return factory.createTypeReferenceNode(entityName, lastTypeArgs);
|
|
47351
47353
|
}
|
|
47352
47354
|
function createAccessFromSymbolChain(chain2, index, stopper) {
|
|
@@ -47390,7 +47392,9 @@ function createTypeChecker(host) {
|
|
|
47390
47392
|
return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2)));
|
|
47391
47393
|
}
|
|
47392
47394
|
}
|
|
47393
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47395
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47396
|
+
if (typeParameterNodes)
|
|
47397
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47394
47398
|
identifier.symbol = symbol2;
|
|
47395
47399
|
if (index > stopper) {
|
|
47396
47400
|
const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper);
|
|
@@ -47448,7 +47452,9 @@ function createTypeChecker(host) {
|
|
|
47448
47452
|
text = `${rawtext}_${i}`;
|
|
47449
47453
|
}
|
|
47450
47454
|
if (text !== rawtext) {
|
|
47451
|
-
|
|
47455
|
+
const typeArguments = getIdentifierTypeArguments(result);
|
|
47456
|
+
result = factory.createIdentifier(text);
|
|
47457
|
+
setIdentifierTypeArguments(result, typeArguments);
|
|
47452
47458
|
}
|
|
47453
47459
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
47454
47460
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
@@ -47472,7 +47478,9 @@ function createTypeChecker(host) {
|
|
|
47472
47478
|
if (index === 0) {
|
|
47473
47479
|
context.flags ^= 16777216 /* InInitialEntityName */;
|
|
47474
47480
|
}
|
|
47475
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47481
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47482
|
+
if (typeParameterNodes)
|
|
47483
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47476
47484
|
identifier.symbol = symbol2;
|
|
47477
47485
|
return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
47478
47486
|
}
|
|
@@ -47495,7 +47503,9 @@ function createTypeChecker(host) {
|
|
|
47495
47503
|
return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
|
|
47496
47504
|
}
|
|
47497
47505
|
if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
47498
|
-
const identifier = setEmitFlags(factory.createIdentifier(symbolName2
|
|
47506
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47507
|
+
if (typeParameterNodes)
|
|
47508
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47499
47509
|
identifier.symbol = symbol2;
|
|
47500
47510
|
return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
47501
47511
|
} else {
|
|
@@ -47510,8 +47520,11 @@ function createTypeChecker(host) {
|
|
|
47510
47520
|
expression = factory.createNumericLiteral(+symbolName2);
|
|
47511
47521
|
}
|
|
47512
47522
|
if (!expression) {
|
|
47513
|
-
|
|
47514
|
-
|
|
47523
|
+
const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 33554432 /* NoAsciiEscaping */);
|
|
47524
|
+
if (typeParameterNodes)
|
|
47525
|
+
setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes));
|
|
47526
|
+
identifier.symbol = symbol2;
|
|
47527
|
+
expression = identifier;
|
|
47515
47528
|
}
|
|
47516
47529
|
return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression);
|
|
47517
47530
|
}
|
|
@@ -61026,19 +61039,22 @@ function createTypeChecker(host) {
|
|
|
61026
61039
|
break;
|
|
61027
61040
|
case 166 /* Parameter */:
|
|
61028
61041
|
const param = declaration;
|
|
61029
|
-
if (isIdentifier(param.name)
|
|
61030
|
-
param
|
|
61031
|
-
param.
|
|
61032
|
-
|
|
61033
|
-
|
|
61034
|
-
|
|
61035
|
-
|
|
61036
|
-
|
|
61037
|
-
|
|
61038
|
-
|
|
61039
|
-
|
|
61040
|
-
|
|
61041
|
-
|
|
61042
|
+
if (isIdentifier(param.name)) {
|
|
61043
|
+
const originalKeywordKind = identifierToKeywordKind(param.name);
|
|
61044
|
+
if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName(
|
|
61045
|
+
param,
|
|
61046
|
+
param.name.escapedText,
|
|
61047
|
+
788968 /* Type */,
|
|
61048
|
+
void 0,
|
|
61049
|
+
param.name.escapedText,
|
|
61050
|
+
/*isUse*/
|
|
61051
|
+
true
|
|
61052
|
+
) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) {
|
|
61053
|
+
const newName = "arg" + param.parent.parameters.indexOf(param);
|
|
61054
|
+
const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
61055
|
+
errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
61056
|
+
return;
|
|
61057
|
+
}
|
|
61042
61058
|
}
|
|
61043
61059
|
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
61060
|
break;
|
|
@@ -61226,6 +61242,10 @@ function createTypeChecker(host) {
|
|
|
61226
61242
|
function isTypeParameterAtTopLevel(type, typeParameter) {
|
|
61227
61243
|
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
61244
|
}
|
|
61245
|
+
function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) {
|
|
61246
|
+
const typePredicate = getTypePredicateOfSignature(signature);
|
|
61247
|
+
return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter);
|
|
61248
|
+
}
|
|
61229
61249
|
function createEmptyObjectTypeFromStringLiteral(type) {
|
|
61230
61250
|
const members = createSymbolTable();
|
|
61231
61251
|
forEachType(type, (t) => {
|
|
@@ -62097,7 +62117,7 @@ function createTypeChecker(host) {
|
|
|
62097
62117
|
function getCovariantInference(inference, signature) {
|
|
62098
62118
|
const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
|
|
62099
62119
|
const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter);
|
|
62100
|
-
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !
|
|
62120
|
+
const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter));
|
|
62101
62121
|
const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates;
|
|
62102
62122
|
const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates);
|
|
62103
62123
|
return getWidenedType(unwidenedType);
|
|
@@ -72826,8 +72846,11 @@ function createTypeChecker(host) {
|
|
|
72826
72846
|
}
|
|
72827
72847
|
function checkTypeReferenceNode(node) {
|
|
72828
72848
|
checkGrammarTypeArguments(node, node.typeArguments);
|
|
72829
|
-
if (node.kind === 180 /* TypeReference */ &&
|
|
72830
|
-
|
|
72849
|
+
if (node.kind === 180 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) {
|
|
72850
|
+
const sourceFile = getSourceFileOfNode(node);
|
|
72851
|
+
if (scanTokenAtPosition(sourceFile, node.typeName.end) === 24 /* DotToken */) {
|
|
72852
|
+
grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
|
|
72853
|
+
}
|
|
72831
72854
|
}
|
|
72832
72855
|
forEach(node.typeArguments, checkSourceElement);
|
|
72833
72856
|
const type = getTypeFromTypeReference(node);
|
|
@@ -78436,8 +78459,9 @@ function createTypeChecker(host) {
|
|
|
78436
78459
|
}
|
|
78437
78460
|
}
|
|
78438
78461
|
function getReferencedImportDeclaration(nodeIn) {
|
|
78439
|
-
|
|
78440
|
-
|
|
78462
|
+
const specifier = getIdentifierGeneratedImportReference(nodeIn);
|
|
78463
|
+
if (specifier) {
|
|
78464
|
+
return specifier;
|
|
78441
78465
|
}
|
|
78442
78466
|
const node = getParseTreeNode(nodeIn, isIdentifier);
|
|
78443
78467
|
if (node) {
|
|
@@ -80415,7 +80439,7 @@ function createTypeChecker(host) {
|
|
|
80415
80439
|
}
|
|
80416
80440
|
function checkGrammarNameInLetOrConstDeclarations(name) {
|
|
80417
80441
|
if (name.kind === 79 /* Identifier */) {
|
|
80418
|
-
if (name.
|
|
80442
|
+
if (name.escapedText === "let") {
|
|
80419
80443
|
return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
|
|
80420
80444
|
}
|
|
80421
80445
|
} else {
|
|
@@ -81219,12 +81243,6 @@ function visitEachChild(node, visitor, context, nodesVisitor = visitNodes2, toke
|
|
|
81219
81243
|
return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor);
|
|
81220
81244
|
}
|
|
81221
81245
|
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
81246
|
[163 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
81229
81247
|
return context.factory.updateQualifiedName(
|
|
81230
81248
|
node,
|
|
@@ -86260,7 +86278,7 @@ function transformClassFields(context) {
|
|
|
86260
86278
|
if (isClassWithConstructorReference) {
|
|
86261
86279
|
enableSubstitutionForClassAliases();
|
|
86262
86280
|
const alias = factory2.cloneNode(temp);
|
|
86263
|
-
alias.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
86281
|
+
alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */;
|
|
86264
86282
|
classAliases[getOriginalNodeId(node)] = alias;
|
|
86265
86283
|
}
|
|
86266
86284
|
setEmitFlags(classExpression, 131072 /* Indented */ | getEmitFlags(classExpression));
|
|
@@ -90396,7 +90414,7 @@ function transformJsx(context) {
|
|
|
90396
90414
|
factory2.createIdentifier(name),
|
|
90397
90415
|
generatedName
|
|
90398
90416
|
);
|
|
90399
|
-
generatedName
|
|
90417
|
+
setIdentifierGeneratedImportReference(generatedName, specifier);
|
|
90400
90418
|
specifierSourceImports.set(name, specifier);
|
|
90401
90419
|
return generatedName;
|
|
90402
90420
|
}
|
|
@@ -91539,7 +91557,7 @@ function transformES2015(context) {
|
|
|
91539
91557
|
return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments"));
|
|
91540
91558
|
}
|
|
91541
91559
|
}
|
|
91542
|
-
if (node.
|
|
91560
|
+
if (node.flags & 128 /* IdentifierHasExtendedUnicodeEscape */) {
|
|
91543
91561
|
return setOriginalNode(setTextRange(
|
|
91544
91562
|
factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)),
|
|
91545
91563
|
node
|
|
@@ -94420,7 +94438,7 @@ function transformES5(context) {
|
|
|
94420
94438
|
return node;
|
|
94421
94439
|
}
|
|
94422
94440
|
function trySubstituteReservedName(name) {
|
|
94423
|
-
const token =
|
|
94441
|
+
const token = identifierToKeywordKind(name);
|
|
94424
94442
|
if (token !== void 0 && token >= 81 /* FirstReservedWord */ && token <= 116 /* LastReservedWord */) {
|
|
94425
94443
|
return setTextRange(factory2.createStringLiteralFromNode(name), name);
|
|
94426
94444
|
}
|
|
@@ -98088,7 +98106,7 @@ function transformModule(context) {
|
|
|
98088
98106
|
return factory2.createPropertyAccessExpression(externalHelpersModuleName, node);
|
|
98089
98107
|
}
|
|
98090
98108
|
return node;
|
|
98091
|
-
} else if (!(isGeneratedIdentifier(node) && !(node.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
98109
|
+
} else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) {
|
|
98092
98110
|
const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node));
|
|
98093
98111
|
if (exportContainer && exportContainer.kind === 308 /* SourceFile */) {
|
|
98094
98112
|
return setTextRange(
|
|
@@ -104041,7 +104059,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
104041
104059
|
/*includeTrivia*/
|
|
104042
104060
|
false
|
|
104043
104061
|
), node.symbol);
|
|
104044
|
-
emitList(node, node
|
|
104062
|
+
emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */);
|
|
104045
104063
|
}
|
|
104046
104064
|
function emitPrivateIdentifier(node) {
|
|
104047
104065
|
write(getTextOfNode2(
|
|
@@ -106759,10 +106777,11 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
106759
106777
|
}
|
|
106760
106778
|
}
|
|
106761
106779
|
function generateName(name) {
|
|
106762
|
-
|
|
106763
|
-
|
|
106780
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
106781
|
+
if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) {
|
|
106782
|
+
return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix);
|
|
106764
106783
|
} else {
|
|
106765
|
-
const autoGenerateId =
|
|
106784
|
+
const autoGenerateId = autoGenerate.id;
|
|
106766
106785
|
return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name));
|
|
106767
106786
|
}
|
|
106768
106787
|
}
|
|
@@ -107042,16 +107061,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107042
107061
|
}
|
|
107043
107062
|
}
|
|
107044
107063
|
function makeName(name) {
|
|
107045
|
-
const
|
|
107046
|
-
const
|
|
107047
|
-
|
|
107064
|
+
const autoGenerate = name.emitNode.autoGenerate;
|
|
107065
|
+
const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName);
|
|
107066
|
+
const suffix = formatGeneratedNamePart(autoGenerate.suffix);
|
|
107067
|
+
switch (autoGenerate.flags & 7 /* KindMask */) {
|
|
107048
107068
|
case 1 /* Auto */:
|
|
107049
|
-
return makeTempVariableName(TempFlags.Auto, !!(
|
|
107069
|
+
return makeTempVariableName(TempFlags.Auto, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix);
|
|
107050
107070
|
case 2 /* Loop */:
|
|
107051
107071
|
Debug.assertNode(name, isIdentifier);
|
|
107052
107072
|
return makeTempVariableName(
|
|
107053
107073
|
TempFlags._i,
|
|
107054
|
-
!!(
|
|
107074
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
107055
107075
|
/*privateName*/
|
|
107056
107076
|
false,
|
|
107057
107077
|
prefix,
|
|
@@ -107060,16 +107080,16 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107060
107080
|
case 3 /* Unique */:
|
|
107061
107081
|
return makeUniqueName(
|
|
107062
107082
|
idText(name),
|
|
107063
|
-
|
|
107064
|
-
!!(
|
|
107065
|
-
!!(
|
|
107083
|
+
autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueName2 : isUniqueName,
|
|
107084
|
+
!!(autoGenerate.flags & 16 /* Optimistic */),
|
|
107085
|
+
!!(autoGenerate.flags & 8 /* ReservedInNestedScopes */),
|
|
107066
107086
|
isPrivateIdentifier(name),
|
|
107067
107087
|
prefix,
|
|
107068
107088
|
suffix
|
|
107069
107089
|
);
|
|
107070
107090
|
}
|
|
107071
107091
|
return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum(
|
|
107072
|
-
|
|
107092
|
+
autoGenerate.flags & 7 /* KindMask */,
|
|
107073
107093
|
GeneratedIdentifierFlags,
|
|
107074
107094
|
/*isFlags*/
|
|
107075
107095
|
true
|