typescript 5.3.0-dev.20231025 → 5.3.0-dev.20231026
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 +443 -391
- package/lib/tsserver.js +546 -494
- package/lib/typescript.d.ts +26 -25
- package/lib/typescript.js +546 -494
- package/lib/typingsInstaller.js +108 -85
- package/package.json +2 -2
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231026`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2921,32 +2921,43 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => {
|
|
|
2921
2921
|
})(NodeFlags || {});
|
|
2922
2922
|
var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
2923
2923
|
ModifierFlags3[ModifierFlags3["None"] = 0] = "None";
|
|
2924
|
-
ModifierFlags3[ModifierFlags3["
|
|
2925
|
-
ModifierFlags3[ModifierFlags3["
|
|
2926
|
-
ModifierFlags3[ModifierFlags3["
|
|
2927
|
-
ModifierFlags3[ModifierFlags3["
|
|
2928
|
-
ModifierFlags3[ModifierFlags3["
|
|
2929
|
-
ModifierFlags3[ModifierFlags3["
|
|
2930
|
-
ModifierFlags3[ModifierFlags3["
|
|
2931
|
-
ModifierFlags3[ModifierFlags3["
|
|
2932
|
-
ModifierFlags3[ModifierFlags3["
|
|
2933
|
-
ModifierFlags3[ModifierFlags3["
|
|
2934
|
-
ModifierFlags3[ModifierFlags3["
|
|
2935
|
-
ModifierFlags3[ModifierFlags3["
|
|
2936
|
-
ModifierFlags3[ModifierFlags3["
|
|
2937
|
-
ModifierFlags3[ModifierFlags3["
|
|
2938
|
-
ModifierFlags3[ModifierFlags3["
|
|
2939
|
-
ModifierFlags3[ModifierFlags3["
|
|
2940
|
-
ModifierFlags3[ModifierFlags3["
|
|
2941
|
-
ModifierFlags3[ModifierFlags3["
|
|
2924
|
+
ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public";
|
|
2925
|
+
ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private";
|
|
2926
|
+
ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected";
|
|
2927
|
+
ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly";
|
|
2928
|
+
ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override";
|
|
2929
|
+
ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export";
|
|
2930
|
+
ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract";
|
|
2931
|
+
ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient";
|
|
2932
|
+
ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static";
|
|
2933
|
+
ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor";
|
|
2934
|
+
ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async";
|
|
2935
|
+
ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default";
|
|
2936
|
+
ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const";
|
|
2937
|
+
ModifierFlags3[ModifierFlags3["In"] = 8192] = "In";
|
|
2938
|
+
ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out";
|
|
2939
|
+
ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator";
|
|
2940
|
+
ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated";
|
|
2941
|
+
ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic";
|
|
2942
|
+
ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate";
|
|
2943
|
+
ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected";
|
|
2944
|
+
ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly";
|
|
2945
|
+
ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride";
|
|
2946
|
+
ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers";
|
|
2947
|
+
ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers";
|
|
2948
|
+
ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers";
|
|
2949
|
+
ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers";
|
|
2950
|
+
ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers";
|
|
2951
|
+
ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers";
|
|
2952
|
+
ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers";
|
|
2942
2953
|
ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags";
|
|
2943
|
-
ModifierFlags3[ModifierFlags3["AccessibilityModifier"] =
|
|
2944
|
-
ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] =
|
|
2945
|
-
ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] =
|
|
2946
|
-
ModifierFlags3[ModifierFlags3["TypeScriptModifier"] =
|
|
2947
|
-
ModifierFlags3[ModifierFlags3["ExportDefault"] =
|
|
2948
|
-
ModifierFlags3[ModifierFlags3["All"] =
|
|
2949
|
-
ModifierFlags3[ModifierFlags3["Modifier"] =
|
|
2954
|
+
ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier";
|
|
2955
|
+
ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier";
|
|
2956
|
+
ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier";
|
|
2957
|
+
ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier";
|
|
2958
|
+
ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault";
|
|
2959
|
+
ModifierFlags3[ModifierFlags3["All"] = 131071] = "All";
|
|
2960
|
+
ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier";
|
|
2950
2961
|
return ModifierFlags3;
|
|
2951
2962
|
})(ModifierFlags || {});
|
|
2952
2963
|
var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
@@ -9515,7 +9526,7 @@ function getAssignedName(node) {
|
|
|
9515
9526
|
}
|
|
9516
9527
|
}
|
|
9517
9528
|
function getModifiers(node) {
|
|
9518
|
-
if (hasSyntacticModifier(node,
|
|
9529
|
+
if (hasSyntacticModifier(node, 98303 /* Modifier */)) {
|
|
9519
9530
|
return filter(node.modifiers, isModifier);
|
|
9520
9531
|
}
|
|
9521
9532
|
}
|
|
@@ -9721,7 +9732,7 @@ function isModifierKind(token) {
|
|
|
9721
9732
|
return false;
|
|
9722
9733
|
}
|
|
9723
9734
|
function isParameterPropertyModifier(kind) {
|
|
9724
|
-
return !!(modifierToFlag(kind) &
|
|
9735
|
+
return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */);
|
|
9725
9736
|
}
|
|
9726
9737
|
function isClassMemberModifier(idToken) {
|
|
9727
9738
|
return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */;
|
|
@@ -10899,10 +10910,13 @@ function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) {
|
|
|
10899
10910
|
if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) {
|
|
10900
10911
|
node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */;
|
|
10901
10912
|
}
|
|
10902
|
-
if (
|
|
10903
|
-
node.modifierFlagsCache
|
|
10913
|
+
if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) {
|
|
10914
|
+
if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) {
|
|
10915
|
+
node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */;
|
|
10916
|
+
}
|
|
10917
|
+
return selectEffectiveModifierFlags(node.modifierFlagsCache);
|
|
10904
10918
|
}
|
|
10905
|
-
return node.modifierFlagsCache
|
|
10919
|
+
return selectSyntacticModifierFlags(node.modifierFlagsCache);
|
|
10906
10920
|
}
|
|
10907
10921
|
function getSyntacticModifierFlags(node) {
|
|
10908
10922
|
return getModifierFlagsWorker(
|
|
@@ -10911,33 +10925,42 @@ function getSyntacticModifierFlags(node) {
|
|
|
10911
10925
|
false
|
|
10912
10926
|
);
|
|
10913
10927
|
}
|
|
10914
|
-
function
|
|
10928
|
+
function getRawJSDocModifierFlagsNoCache(node) {
|
|
10915
10929
|
let flags = 0 /* None */;
|
|
10916
10930
|
if (!!node.parent && !isParameter(node)) {
|
|
10917
10931
|
if (isInJSFile(node)) {
|
|
10918
10932
|
if (getJSDocPublicTagNoCache(node))
|
|
10919
|
-
flags |=
|
|
10933
|
+
flags |= 8388608 /* JSDocPublic */;
|
|
10920
10934
|
if (getJSDocPrivateTagNoCache(node))
|
|
10921
|
-
flags |=
|
|
10935
|
+
flags |= 16777216 /* JSDocPrivate */;
|
|
10922
10936
|
if (getJSDocProtectedTagNoCache(node))
|
|
10923
|
-
flags |=
|
|
10937
|
+
flags |= 33554432 /* JSDocProtected */;
|
|
10924
10938
|
if (getJSDocReadonlyTagNoCache(node))
|
|
10925
|
-
flags |=
|
|
10939
|
+
flags |= 67108864 /* JSDocReadonly */;
|
|
10926
10940
|
if (getJSDocOverrideTagNoCache(node))
|
|
10927
|
-
flags |=
|
|
10941
|
+
flags |= 134217728 /* JSDocOverride */;
|
|
10928
10942
|
}
|
|
10929
10943
|
if (getJSDocDeprecatedTagNoCache(node))
|
|
10930
|
-
flags |=
|
|
10944
|
+
flags |= 65536 /* Deprecated */;
|
|
10931
10945
|
}
|
|
10932
10946
|
return flags;
|
|
10933
10947
|
}
|
|
10948
|
+
function selectSyntacticModifierFlags(flags) {
|
|
10949
|
+
return flags & 65535 /* SyntacticModifiers */;
|
|
10950
|
+
}
|
|
10951
|
+
function selectEffectiveModifierFlags(flags) {
|
|
10952
|
+
return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23;
|
|
10953
|
+
}
|
|
10954
|
+
function getJSDocModifierFlagsNoCache(node) {
|
|
10955
|
+
return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node));
|
|
10956
|
+
}
|
|
10934
10957
|
function getEffectiveModifierFlagsNoCache(node) {
|
|
10935
10958
|
return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node);
|
|
10936
10959
|
}
|
|
10937
10960
|
function getSyntacticModifierFlagsNoCache(node) {
|
|
10938
10961
|
let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */;
|
|
10939
10962
|
if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) {
|
|
10940
|
-
flags |=
|
|
10963
|
+
flags |= 32 /* Export */;
|
|
10941
10964
|
}
|
|
10942
10965
|
return flags;
|
|
10943
10966
|
}
|
|
@@ -10953,37 +10976,37 @@ function modifiersToFlags(modifiers) {
|
|
|
10953
10976
|
function modifierToFlag(token) {
|
|
10954
10977
|
switch (token) {
|
|
10955
10978
|
case 126 /* StaticKeyword */:
|
|
10956
|
-
return
|
|
10979
|
+
return 256 /* Static */;
|
|
10957
10980
|
case 125 /* PublicKeyword */:
|
|
10958
|
-
return
|
|
10981
|
+
return 1 /* Public */;
|
|
10959
10982
|
case 124 /* ProtectedKeyword */:
|
|
10960
|
-
return
|
|
10983
|
+
return 4 /* Protected */;
|
|
10961
10984
|
case 123 /* PrivateKeyword */:
|
|
10962
|
-
return
|
|
10985
|
+
return 2 /* Private */;
|
|
10963
10986
|
case 128 /* AbstractKeyword */:
|
|
10964
|
-
return
|
|
10987
|
+
return 64 /* Abstract */;
|
|
10965
10988
|
case 129 /* AccessorKeyword */:
|
|
10966
|
-
return
|
|
10989
|
+
return 512 /* Accessor */;
|
|
10967
10990
|
case 95 /* ExportKeyword */:
|
|
10968
|
-
return
|
|
10991
|
+
return 32 /* Export */;
|
|
10969
10992
|
case 138 /* DeclareKeyword */:
|
|
10970
|
-
return
|
|
10993
|
+
return 128 /* Ambient */;
|
|
10971
10994
|
case 87 /* ConstKeyword */:
|
|
10972
|
-
return
|
|
10995
|
+
return 4096 /* Const */;
|
|
10973
10996
|
case 90 /* DefaultKeyword */:
|
|
10974
|
-
return
|
|
10997
|
+
return 2048 /* Default */;
|
|
10975
10998
|
case 134 /* AsyncKeyword */:
|
|
10976
|
-
return
|
|
10999
|
+
return 1024 /* Async */;
|
|
10977
11000
|
case 148 /* ReadonlyKeyword */:
|
|
10978
|
-
return
|
|
11001
|
+
return 8 /* Readonly */;
|
|
10979
11002
|
case 164 /* OverrideKeyword */:
|
|
10980
|
-
return
|
|
11003
|
+
return 16 /* Override */;
|
|
10981
11004
|
case 103 /* InKeyword */:
|
|
10982
|
-
return
|
|
11005
|
+
return 8192 /* In */;
|
|
10983
11006
|
case 147 /* OutKeyword */:
|
|
10984
|
-
return
|
|
11007
|
+
return 16384 /* Out */;
|
|
10985
11008
|
case 170 /* Decorator */:
|
|
10986
|
-
return
|
|
11009
|
+
return 32768 /* Decorator */;
|
|
10987
11010
|
}
|
|
10988
11011
|
return 0 /* None */;
|
|
10989
11012
|
}
|
|
@@ -13302,35 +13325,35 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13302
13325
|
}
|
|
13303
13326
|
function createModifiersFromModifierFlags(flags2) {
|
|
13304
13327
|
const result = [];
|
|
13305
|
-
if (flags2 &
|
|
13328
|
+
if (flags2 & 32 /* Export */)
|
|
13306
13329
|
result.push(createModifier(95 /* ExportKeyword */));
|
|
13307
|
-
if (flags2 &
|
|
13330
|
+
if (flags2 & 128 /* Ambient */)
|
|
13308
13331
|
result.push(createModifier(138 /* DeclareKeyword */));
|
|
13309
|
-
if (flags2 &
|
|
13332
|
+
if (flags2 & 2048 /* Default */)
|
|
13310
13333
|
result.push(createModifier(90 /* DefaultKeyword */));
|
|
13311
|
-
if (flags2 &
|
|
13334
|
+
if (flags2 & 4096 /* Const */)
|
|
13312
13335
|
result.push(createModifier(87 /* ConstKeyword */));
|
|
13313
|
-
if (flags2 &
|
|
13336
|
+
if (flags2 & 1 /* Public */)
|
|
13314
13337
|
result.push(createModifier(125 /* PublicKeyword */));
|
|
13315
|
-
if (flags2 &
|
|
13338
|
+
if (flags2 & 2 /* Private */)
|
|
13316
13339
|
result.push(createModifier(123 /* PrivateKeyword */));
|
|
13317
|
-
if (flags2 &
|
|
13340
|
+
if (flags2 & 4 /* Protected */)
|
|
13318
13341
|
result.push(createModifier(124 /* ProtectedKeyword */));
|
|
13319
|
-
if (flags2 &
|
|
13342
|
+
if (flags2 & 64 /* Abstract */)
|
|
13320
13343
|
result.push(createModifier(128 /* AbstractKeyword */));
|
|
13321
|
-
if (flags2 &
|
|
13344
|
+
if (flags2 & 256 /* Static */)
|
|
13322
13345
|
result.push(createModifier(126 /* StaticKeyword */));
|
|
13323
|
-
if (flags2 &
|
|
13346
|
+
if (flags2 & 16 /* Override */)
|
|
13324
13347
|
result.push(createModifier(164 /* OverrideKeyword */));
|
|
13325
|
-
if (flags2 &
|
|
13348
|
+
if (flags2 & 8 /* Readonly */)
|
|
13326
13349
|
result.push(createModifier(148 /* ReadonlyKeyword */));
|
|
13327
|
-
if (flags2 &
|
|
13350
|
+
if (flags2 & 512 /* Accessor */)
|
|
13328
13351
|
result.push(createModifier(129 /* AccessorKeyword */));
|
|
13329
|
-
if (flags2 &
|
|
13352
|
+
if (flags2 & 1024 /* Async */)
|
|
13330
13353
|
result.push(createModifier(134 /* AsyncKeyword */));
|
|
13331
|
-
if (flags2 &
|
|
13354
|
+
if (flags2 & 8192 /* In */)
|
|
13332
13355
|
result.push(createModifier(103 /* InKeyword */));
|
|
13333
|
-
if (flags2 &
|
|
13356
|
+
if (flags2 & 16384 /* Out */)
|
|
13334
13357
|
result.push(createModifier(147 /* OutKeyword */));
|
|
13335
13358
|
return result.length ? result : void 0;
|
|
13336
13359
|
}
|
|
@@ -13379,7 +13402,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13379
13402
|
if (isThisIdentifier(node.name)) {
|
|
13380
13403
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13381
13404
|
} else {
|
|
13382
|
-
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) &
|
|
13405
|
+
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */);
|
|
13383
13406
|
}
|
|
13384
13407
|
node.jsDoc = void 0;
|
|
13385
13408
|
return node;
|
|
@@ -13428,8 +13451,8 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13428
13451
|
node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0;
|
|
13429
13452
|
node.type = type;
|
|
13430
13453
|
node.initializer = asInitializer(initializer);
|
|
13431
|
-
const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) &
|
|
13432
|
-
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) &
|
|
13454
|
+
const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */;
|
|
13455
|
+
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) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */;
|
|
13433
13456
|
node.jsDoc = void 0;
|
|
13434
13457
|
return node;
|
|
13435
13458
|
}
|
|
@@ -13468,7 +13491,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
13468
13491
|
if (!node.body) {
|
|
13469
13492
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
13470
13493
|
} else {
|
|
13471
|
-
const isAsync = modifiersToFlags(node.modifiers) &
|
|
13494
|
+
const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
|
|
13472
13495
|
const isGenerator = !!node.asteriskToken;
|
|
13473
13496
|
const isAsyncGenerator = isAsync && isGenerator;
|
|
13474
13497
|
node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | 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.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */;
|
|
@@ -14211,7 +14234,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14211
14234
|
node.parameters = createNodeArray(parameters);
|
|
14212
14235
|
node.type = type;
|
|
14213
14236
|
node.body = body;
|
|
14214
|
-
const isAsync = modifiersToFlags(node.modifiers) &
|
|
14237
|
+
const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
|
|
14215
14238
|
const isGenerator = !!node.asteriskToken;
|
|
14216
14239
|
const isAsyncGenerator = isAsync && isGenerator;
|
|
14217
14240
|
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 */;
|
|
@@ -14235,7 +14258,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14235
14258
|
node.type = type;
|
|
14236
14259
|
node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */);
|
|
14237
14260
|
node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body);
|
|
14238
|
-
const isAsync = modifiersToFlags(node.modifiers) &
|
|
14261
|
+
const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
|
|
14239
14262
|
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 */;
|
|
14240
14263
|
node.typeArguments = void 0;
|
|
14241
14264
|
node.jsDoc = void 0;
|
|
@@ -14587,7 +14610,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14587
14610
|
node.modifiers = asNodeArray(modifiers);
|
|
14588
14611
|
node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
|
|
14589
14612
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList);
|
|
14590
|
-
if (modifiersToFlags(node.modifiers) &
|
|
14613
|
+
if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
|
|
14591
14614
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14592
14615
|
}
|
|
14593
14616
|
node.jsDoc = void 0;
|
|
@@ -14837,10 +14860,10 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14837
14860
|
node.parameters = createNodeArray(parameters);
|
|
14838
14861
|
node.type = type;
|
|
14839
14862
|
node.body = body;
|
|
14840
|
-
if (!node.body || modifiersToFlags(node.modifiers) &
|
|
14863
|
+
if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
|
|
14841
14864
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14842
14865
|
} else {
|
|
14843
|
-
const isAsync = modifiersToFlags(node.modifiers) &
|
|
14866
|
+
const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */;
|
|
14844
14867
|
const isGenerator = !!node.asteriskToken;
|
|
14845
14868
|
const isAsyncGenerator = isAsync && isGenerator;
|
|
14846
14869
|
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 */;
|
|
@@ -14871,7 +14894,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14871
14894
|
node.typeParameters = asNodeArray(typeParameters);
|
|
14872
14895
|
node.heritageClauses = asNodeArray(heritageClauses);
|
|
14873
14896
|
node.members = createNodeArray(members);
|
|
14874
|
-
if (modifiersToFlags(node.modifiers) &
|
|
14897
|
+
if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
|
|
14875
14898
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14876
14899
|
} else {
|
|
14877
14900
|
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 */;
|
|
@@ -14933,7 +14956,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14933
14956
|
node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */);
|
|
14934
14957
|
node.name = name;
|
|
14935
14958
|
node.body = body;
|
|
14936
|
-
if (modifiersToFlags(node.modifiers) &
|
|
14959
|
+
if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) {
|
|
14937
14960
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
14938
14961
|
} else {
|
|
14939
14962
|
node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */;
|
|
@@ -16364,7 +16387,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16364
16387
|
return qualifiedName;
|
|
16365
16388
|
}
|
|
16366
16389
|
function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) {
|
|
16367
|
-
if (ns && hasSyntacticModifier(node,
|
|
16390
|
+
if (ns && hasSyntacticModifier(node, 32 /* Export */)) {
|
|
16368
16391
|
return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps);
|
|
16369
16392
|
}
|
|
16370
16393
|
return getExportName(node, allowComments, allowSourceMaps);
|
|
@@ -23160,11 +23183,11 @@ var Parser;
|
|
|
23160
23183
|
const modifierFlags = modifiersToFlags(modifiers);
|
|
23161
23184
|
parseExpected(100 /* FunctionKeyword */);
|
|
23162
23185
|
const asteriskToken = parseOptionalToken(42 /* AsteriskToken */);
|
|
23163
|
-
const name = modifierFlags &
|
|
23186
|
+
const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier();
|
|
23164
23187
|
const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */;
|
|
23165
|
-
const isAsync = modifierFlags &
|
|
23188
|
+
const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */;
|
|
23166
23189
|
const typeParameters = parseTypeParameters();
|
|
23167
|
-
if (modifierFlags &
|
|
23190
|
+
if (modifierFlags & 32 /* Export */)
|
|
23168
23191
|
setAwaitContext(
|
|
23169
23192
|
/*value*/
|
|
23170
23193
|
true
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.3.0-dev.
|
|
5
|
+
"version": "5.3.0-dev.20231026",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "aa9b6953441b53f8b14072c047f0519b611150c4"
|
|
119
119
|
}
|