typescript 5.2.0-dev.20230803 → 5.2.0-dev.20230804
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 +83 -36
- package/lib/tsserver.js +88 -36
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +88 -36
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +88 -36
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.2";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230804`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -44357,7 +44357,7 @@ function createTypeChecker(host) {
|
|
|
44357
44357
|
return symbol;
|
|
44358
44358
|
}
|
|
44359
44359
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
44360
|
-
const targetFlags =
|
|
44360
|
+
const targetFlags = getSymbolFlags(symbol);
|
|
44361
44361
|
if (targetFlags & meaning) {
|
|
44362
44362
|
return symbol;
|
|
44363
44363
|
}
|
|
@@ -45117,7 +45117,7 @@ function createTypeChecker(host) {
|
|
|
45117
45117
|
/*isUse*/
|
|
45118
45118
|
false
|
|
45119
45119
|
));
|
|
45120
|
-
const allFlags = symbol &&
|
|
45120
|
+
const allFlags = symbol && getSymbolFlags(symbol);
|
|
45121
45121
|
if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
|
|
45122
45122
|
const rawName = unescapeLeadingUnderscores(name);
|
|
45123
45123
|
if (isES2015OrLaterConstructorName(name)) {
|
|
@@ -45853,11 +45853,23 @@ function createTypeChecker(host) {
|
|
|
45853
45853
|
}
|
|
45854
45854
|
return void 0;
|
|
45855
45855
|
}
|
|
45856
|
-
function
|
|
45857
|
-
|
|
45856
|
+
function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {
|
|
45857
|
+
const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);
|
|
45858
|
+
const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);
|
|
45859
|
+
const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(
|
|
45860
|
+
typeOnlyDeclaration.moduleSpecifier,
|
|
45861
|
+
typeOnlyDeclaration.moduleSpecifier,
|
|
45862
|
+
/*ignoreErrors*/
|
|
45863
|
+
true
|
|
45864
|
+
) : resolveAlias(typeOnlyDeclaration.symbol));
|
|
45865
|
+
const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;
|
|
45866
|
+
let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;
|
|
45858
45867
|
let seenSymbols;
|
|
45859
45868
|
while (symbol.flags & 2097152 /* Alias */) {
|
|
45860
|
-
const target = resolveAlias(symbol);
|
|
45869
|
+
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
45870
|
+
if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {
|
|
45871
|
+
break;
|
|
45872
|
+
}
|
|
45861
45873
|
if (target === unknownSymbol) {
|
|
45862
45874
|
return 67108863 /* All */;
|
|
45863
45875
|
}
|
|
@@ -45915,7 +45927,7 @@ function createTypeChecker(host) {
|
|
|
45915
45927
|
}
|
|
45916
45928
|
if (links.typeOnlyDeclaration) {
|
|
45917
45929
|
const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
|
|
45918
|
-
return
|
|
45930
|
+
return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
|
|
45919
45931
|
}
|
|
45920
45932
|
return void 0;
|
|
45921
45933
|
}
|
|
@@ -45926,7 +45938,11 @@ function createTypeChecker(host) {
|
|
|
45926
45938
|
const symbol = getSymbolOfDeclaration(node);
|
|
45927
45939
|
const target = resolveAlias(symbol);
|
|
45928
45940
|
if (target) {
|
|
45929
|
-
const markAlias = target === unknownSymbol ||
|
|
45941
|
+
const markAlias = target === unknownSymbol || getSymbolFlags(
|
|
45942
|
+
symbol,
|
|
45943
|
+
/*excludeTypeOnlyMeanings*/
|
|
45944
|
+
true
|
|
45945
|
+
) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
|
|
45930
45946
|
if (markAlias) {
|
|
45931
45947
|
markAliasSymbolAsReferenced(symbol);
|
|
45932
45948
|
}
|
|
@@ -45941,7 +45957,7 @@ function createTypeChecker(host) {
|
|
|
45941
45957
|
if (!node)
|
|
45942
45958
|
return Debug.fail();
|
|
45943
45959
|
if (isInternalModuleImportEqualsDeclaration(node)) {
|
|
45944
|
-
if (
|
|
45960
|
+
if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
|
|
45945
45961
|
checkExpressionCached(node.moduleReference);
|
|
45946
45962
|
}
|
|
45947
45963
|
}
|
|
@@ -46792,7 +46808,7 @@ function createTypeChecker(host) {
|
|
|
46792
46808
|
return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
|
|
46793
46809
|
}
|
|
46794
46810
|
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
46795
|
-
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ &&
|
|
46811
|
+
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
|
|
46796
46812
|
}
|
|
46797
46813
|
function findConstructorDeclaration(node) {
|
|
46798
46814
|
const members = node.members;
|
|
@@ -47059,7 +47075,7 @@ function createTypeChecker(host) {
|
|
|
47059
47075
|
}
|
|
47060
47076
|
const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
|
|
47061
47077
|
symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
|
|
47062
|
-
const flags = shouldResolveAlias ?
|
|
47078
|
+
const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
|
|
47063
47079
|
if (flags & meaning) {
|
|
47064
47080
|
qualify = true;
|
|
47065
47081
|
return true;
|
|
@@ -49921,7 +49937,7 @@ function createTypeChecker(host) {
|
|
|
49921
49937
|
return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
|
|
49922
49938
|
}
|
|
49923
49939
|
function isTypeOnlyNamespace(symbol) {
|
|
49924
|
-
return every(getNamespaceMembersForSerialization(symbol), (m) => !(
|
|
49940
|
+
return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
|
|
49925
49941
|
}
|
|
49926
49942
|
function serializeModule(symbol, symbolName2, modifierFlags) {
|
|
49927
49943
|
const members = getNamespaceMembersForSerialization(symbol);
|
|
@@ -52193,7 +52209,7 @@ function createTypeChecker(host) {
|
|
|
52193
52209
|
true
|
|
52194
52210
|
);
|
|
52195
52211
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
52196
|
-
links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType :
|
|
52212
|
+
links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
|
|
52197
52213
|
}
|
|
52198
52214
|
return links.type;
|
|
52199
52215
|
}
|
|
@@ -59803,6 +59819,7 @@ function createTypeChecker(host) {
|
|
|
59803
59819
|
let errorInfo;
|
|
59804
59820
|
let relatedInfo;
|
|
59805
59821
|
let maybeKeys;
|
|
59822
|
+
let maybeKeysSet;
|
|
59806
59823
|
let sourceStack;
|
|
59807
59824
|
let targetStack;
|
|
59808
59825
|
let maybeCount = 0;
|
|
@@ -60672,9 +60689,13 @@ function createTypeChecker(host) {
|
|
|
60672
60689
|
}
|
|
60673
60690
|
if (!maybeKeys) {
|
|
60674
60691
|
maybeKeys = [];
|
|
60692
|
+
maybeKeysSet = /* @__PURE__ */ new Set();
|
|
60675
60693
|
sourceStack = [];
|
|
60676
60694
|
targetStack = [];
|
|
60677
60695
|
} else {
|
|
60696
|
+
if (maybeKeysSet.has(id)) {
|
|
60697
|
+
return 3 /* Maybe */;
|
|
60698
|
+
}
|
|
60678
60699
|
const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
|
|
60679
60700
|
source2,
|
|
60680
60701
|
target2,
|
|
@@ -60683,10 +60704,8 @@ function createTypeChecker(host) {
|
|
|
60683
60704
|
/*ignoreConstraints*/
|
|
60684
60705
|
true
|
|
60685
60706
|
) : void 0;
|
|
60686
|
-
|
|
60687
|
-
|
|
60688
|
-
return 3 /* Maybe */;
|
|
60689
|
-
}
|
|
60707
|
+
if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
|
|
60708
|
+
return 3 /* Maybe */;
|
|
60690
60709
|
}
|
|
60691
60710
|
if (sourceDepth === 100 || targetDepth === 100) {
|
|
60692
60711
|
overflow = true;
|
|
@@ -60695,6 +60714,7 @@ function createTypeChecker(host) {
|
|
|
60695
60714
|
}
|
|
60696
60715
|
const maybeStart = maybeCount;
|
|
60697
60716
|
maybeKeys[maybeCount] = id;
|
|
60717
|
+
maybeKeysSet.add(id);
|
|
60698
60718
|
maybeCount++;
|
|
60699
60719
|
const saveExpandingFlags = expandingFlags;
|
|
60700
60720
|
if (recursionFlags & 1 /* Source */) {
|
|
@@ -60747,17 +60767,34 @@ function createTypeChecker(host) {
|
|
|
60747
60767
|
if (result2) {
|
|
60748
60768
|
if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
|
|
60749
60769
|
if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
|
|
60750
|
-
|
|
60751
|
-
|
|
60752
|
-
|
|
60770
|
+
resetMaybeStack(
|
|
60771
|
+
/*markAllAsSucceeded*/
|
|
60772
|
+
true
|
|
60773
|
+
);
|
|
60774
|
+
} else {
|
|
60775
|
+
resetMaybeStack(
|
|
60776
|
+
/*markAllAsSucceeded*/
|
|
60777
|
+
false
|
|
60778
|
+
);
|
|
60753
60779
|
}
|
|
60754
|
-
maybeCount = maybeStart;
|
|
60755
60780
|
}
|
|
60756
60781
|
} else {
|
|
60757
60782
|
relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
|
|
60758
|
-
|
|
60783
|
+
resetMaybeStack(
|
|
60784
|
+
/*markAllAsSucceeded*/
|
|
60785
|
+
false
|
|
60786
|
+
);
|
|
60759
60787
|
}
|
|
60760
60788
|
return result2;
|
|
60789
|
+
function resetMaybeStack(markAllAsSucceeded) {
|
|
60790
|
+
for (let i = maybeStart; i < maybeCount; i++) {
|
|
60791
|
+
maybeKeysSet.delete(maybeKeys[i]);
|
|
60792
|
+
if (markAllAsSucceeded) {
|
|
60793
|
+
relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
|
|
60794
|
+
}
|
|
60795
|
+
}
|
|
60796
|
+
maybeCount = maybeStart;
|
|
60797
|
+
}
|
|
60761
60798
|
}
|
|
60762
60799
|
function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
|
|
60763
60800
|
const saveErrorInfo = captureErrorCalculationState();
|
|
@@ -66201,9 +66238,13 @@ function createTypeChecker(host) {
|
|
|
66201
66238
|
symbol,
|
|
66202
66239
|
/*excludes*/
|
|
66203
66240
|
111551 /* Value */
|
|
66204
|
-
) && !isInTypeQuery(location)
|
|
66241
|
+
) && !isInTypeQuery(location)) {
|
|
66205
66242
|
const target = resolveAlias(symbol);
|
|
66206
|
-
if (
|
|
66243
|
+
if (getSymbolFlags(
|
|
66244
|
+
symbol,
|
|
66245
|
+
/*excludeTypeOnlyMeanings*/
|
|
66246
|
+
true
|
|
66247
|
+
) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
|
|
66207
66248
|
if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
66208
66249
|
markAliasSymbolAsReferenced(symbol);
|
|
66209
66250
|
} else {
|
|
@@ -77006,9 +77047,6 @@ function createTypeChecker(host) {
|
|
|
77006
77047
|
if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
|
|
77007
77048
|
return;
|
|
77008
77049
|
}
|
|
77009
|
-
if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
|
|
77010
|
-
return;
|
|
77011
|
-
}
|
|
77012
77050
|
const symbol = getSymbolOfDeclaration(node);
|
|
77013
77051
|
if (symbol.flags & 1 /* FunctionScopedVariable */) {
|
|
77014
77052
|
if (!isIdentifier(node.name))
|
|
@@ -79630,7 +79668,7 @@ function createTypeChecker(host) {
|
|
|
79630
79668
|
}
|
|
79631
79669
|
return;
|
|
79632
79670
|
}
|
|
79633
|
-
const targetFlags =
|
|
79671
|
+
const targetFlags = getSymbolFlags(target);
|
|
79634
79672
|
const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);
|
|
79635
79673
|
if (targetFlags & excludedMeanings) {
|
|
79636
79674
|
const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
|
|
@@ -79788,7 +79826,7 @@ function createTypeChecker(host) {
|
|
|
79788
79826
|
if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
|
|
79789
79827
|
const target = resolveAlias(getSymbolOfDeclaration(node));
|
|
79790
79828
|
if (target !== unknownSymbol) {
|
|
79791
|
-
const targetFlags =
|
|
79829
|
+
const targetFlags = getSymbolFlags(target);
|
|
79792
79830
|
if (targetFlags & 111551 /* Value */) {
|
|
79793
79831
|
const moduleName = getFirstIdentifier(node.moduleReference);
|
|
79794
79832
|
if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
|
|
@@ -79928,7 +79966,7 @@ function createTypeChecker(host) {
|
|
|
79928
79966
|
markExportAsReferenced(node);
|
|
79929
79967
|
}
|
|
79930
79968
|
const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
|
|
79931
|
-
if (!target ||
|
|
79969
|
+
if (!target || getSymbolFlags(target) & 111551 /* Value */) {
|
|
79932
79970
|
checkExpressionCached(node.propertyName || node.name);
|
|
79933
79971
|
}
|
|
79934
79972
|
}
|
|
@@ -79973,7 +80011,7 @@ function createTypeChecker(host) {
|
|
|
79973
80011
|
));
|
|
79974
80012
|
if (sym) {
|
|
79975
80013
|
markAliasReferenced(sym, id);
|
|
79976
|
-
if (
|
|
80014
|
+
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
79977
80015
|
checkExpressionCached(id);
|
|
79978
80016
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
|
|
79979
80017
|
error(
|
|
@@ -81220,7 +81258,7 @@ function createTypeChecker(host) {
|
|
|
81220
81258
|
return symbolLinks2.exportsSomeValue;
|
|
81221
81259
|
function isValue(s) {
|
|
81222
81260
|
s = resolveSymbol(s);
|
|
81223
|
-
return s && !!(
|
|
81261
|
+
return s && !!(getSymbolFlags(s) & 111551 /* Value */);
|
|
81224
81262
|
}
|
|
81225
81263
|
}
|
|
81226
81264
|
function isNameOfModuleOrEnumDeclaration(node) {
|
|
@@ -81350,7 +81388,11 @@ function createTypeChecker(host) {
|
|
|
81350
81388
|
case 276 /* ImportSpecifier */:
|
|
81351
81389
|
case 281 /* ExportSpecifier */:
|
|
81352
81390
|
const symbol = getSymbolOfDeclaration(node);
|
|
81353
|
-
return !!symbol && isAliasResolvedToValue(
|
|
81391
|
+
return !!symbol && isAliasResolvedToValue(
|
|
81392
|
+
symbol,
|
|
81393
|
+
/*excludeTypeOnlyValues*/
|
|
81394
|
+
true
|
|
81395
|
+
);
|
|
81354
81396
|
case 278 /* ExportDeclaration */:
|
|
81355
81397
|
const exportClause = node.exportClause;
|
|
81356
81398
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
@@ -81367,7 +81409,7 @@ function createTypeChecker(host) {
|
|
|
81367
81409
|
const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
|
|
81368
81410
|
return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
|
|
81369
81411
|
}
|
|
81370
|
-
function isAliasResolvedToValue(symbol) {
|
|
81412
|
+
function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
|
|
81371
81413
|
if (!symbol) {
|
|
81372
81414
|
return false;
|
|
81373
81415
|
}
|
|
@@ -81375,7 +81417,12 @@ function createTypeChecker(host) {
|
|
|
81375
81417
|
if (target === unknownSymbol) {
|
|
81376
81418
|
return true;
|
|
81377
81419
|
}
|
|
81378
|
-
return !!((
|
|
81420
|
+
return !!(getSymbolFlags(
|
|
81421
|
+
symbol,
|
|
81422
|
+
excludeTypeOnlyValues,
|
|
81423
|
+
/*excludeLocalMeanings*/
|
|
81424
|
+
true
|
|
81425
|
+
) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
|
|
81379
81426
|
}
|
|
81380
81427
|
function isConstEnumOrConstEnumOnlyModule(s) {
|
|
81381
81428
|
return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
|
|
@@ -81389,7 +81436,7 @@ function createTypeChecker(host) {
|
|
|
81389
81436
|
return true;
|
|
81390
81437
|
}
|
|
81391
81438
|
const target = getSymbolLinks(symbol).aliasTarget;
|
|
81392
|
-
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ &&
|
|
81439
|
+
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
|
|
81393
81440
|
return true;
|
|
81394
81441
|
}
|
|
81395
81442
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2331,7 +2331,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2331
2331
|
|
|
2332
2332
|
// src/compiler/corePublic.ts
|
|
2333
2333
|
var versionMajorMinor = "5.2";
|
|
2334
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2334
|
+
var version = `${versionMajorMinor}.0-dev.20230804`;
|
|
2335
2335
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2336
2336
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2337
2337
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -49068,7 +49068,7 @@ function createTypeChecker(host) {
|
|
|
49068
49068
|
return symbol;
|
|
49069
49069
|
}
|
|
49070
49070
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
49071
|
-
const targetFlags =
|
|
49071
|
+
const targetFlags = getSymbolFlags(symbol);
|
|
49072
49072
|
if (targetFlags & meaning) {
|
|
49073
49073
|
return symbol;
|
|
49074
49074
|
}
|
|
@@ -49828,7 +49828,7 @@ function createTypeChecker(host) {
|
|
|
49828
49828
|
/*isUse*/
|
|
49829
49829
|
false
|
|
49830
49830
|
));
|
|
49831
|
-
const allFlags = symbol &&
|
|
49831
|
+
const allFlags = symbol && getSymbolFlags(symbol);
|
|
49832
49832
|
if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
|
|
49833
49833
|
const rawName = unescapeLeadingUnderscores(name);
|
|
49834
49834
|
if (isES2015OrLaterConstructorName(name)) {
|
|
@@ -50564,11 +50564,23 @@ function createTypeChecker(host) {
|
|
|
50564
50564
|
}
|
|
50565
50565
|
return void 0;
|
|
50566
50566
|
}
|
|
50567
|
-
function
|
|
50568
|
-
|
|
50567
|
+
function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) {
|
|
50568
|
+
const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol);
|
|
50569
|
+
const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration);
|
|
50570
|
+
const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName(
|
|
50571
|
+
typeOnlyDeclaration.moduleSpecifier,
|
|
50572
|
+
typeOnlyDeclaration.moduleSpecifier,
|
|
50573
|
+
/*ignoreErrors*/
|
|
50574
|
+
true
|
|
50575
|
+
) : resolveAlias(typeOnlyDeclaration.symbol));
|
|
50576
|
+
const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0;
|
|
50577
|
+
let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags;
|
|
50569
50578
|
let seenSymbols;
|
|
50570
50579
|
while (symbol.flags & 2097152 /* Alias */) {
|
|
50571
|
-
const target = resolveAlias(symbol);
|
|
50580
|
+
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
50581
|
+
if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) {
|
|
50582
|
+
break;
|
|
50583
|
+
}
|
|
50572
50584
|
if (target === unknownSymbol) {
|
|
50573
50585
|
return 67108863 /* All */;
|
|
50574
50586
|
}
|
|
@@ -50626,7 +50638,7 @@ function createTypeChecker(host) {
|
|
|
50626
50638
|
}
|
|
50627
50639
|
if (links.typeOnlyDeclaration) {
|
|
50628
50640
|
const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
|
|
50629
|
-
return
|
|
50641
|
+
return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
|
|
50630
50642
|
}
|
|
50631
50643
|
return void 0;
|
|
50632
50644
|
}
|
|
@@ -50637,7 +50649,11 @@ function createTypeChecker(host) {
|
|
|
50637
50649
|
const symbol = getSymbolOfDeclaration(node);
|
|
50638
50650
|
const target = resolveAlias(symbol);
|
|
50639
50651
|
if (target) {
|
|
50640
|
-
const markAlias = target === unknownSymbol ||
|
|
50652
|
+
const markAlias = target === unknownSymbol || getSymbolFlags(
|
|
50653
|
+
symbol,
|
|
50654
|
+
/*excludeTypeOnlyMeanings*/
|
|
50655
|
+
true
|
|
50656
|
+
) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
|
|
50641
50657
|
if (markAlias) {
|
|
50642
50658
|
markAliasSymbolAsReferenced(symbol);
|
|
50643
50659
|
}
|
|
@@ -50652,7 +50668,7 @@ function createTypeChecker(host) {
|
|
|
50652
50668
|
if (!node)
|
|
50653
50669
|
return Debug.fail();
|
|
50654
50670
|
if (isInternalModuleImportEqualsDeclaration(node)) {
|
|
50655
|
-
if (
|
|
50671
|
+
if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
|
|
50656
50672
|
checkExpressionCached(node.moduleReference);
|
|
50657
50673
|
}
|
|
50658
50674
|
}
|
|
@@ -51503,7 +51519,7 @@ function createTypeChecker(host) {
|
|
|
51503
51519
|
return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
|
|
51504
51520
|
}
|
|
51505
51521
|
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
51506
|
-
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ &&
|
|
51522
|
+
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
|
|
51507
51523
|
}
|
|
51508
51524
|
function findConstructorDeclaration(node) {
|
|
51509
51525
|
const members = node.members;
|
|
@@ -51770,7 +51786,7 @@ function createTypeChecker(host) {
|
|
|
51770
51786
|
}
|
|
51771
51787
|
const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
|
|
51772
51788
|
symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
|
|
51773
|
-
const flags = shouldResolveAlias ?
|
|
51789
|
+
const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
|
|
51774
51790
|
if (flags & meaning) {
|
|
51775
51791
|
qualify = true;
|
|
51776
51792
|
return true;
|
|
@@ -54632,7 +54648,7 @@ function createTypeChecker(host) {
|
|
|
54632
54648
|
return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
|
|
54633
54649
|
}
|
|
54634
54650
|
function isTypeOnlyNamespace(symbol) {
|
|
54635
|
-
return every(getNamespaceMembersForSerialization(symbol), (m) => !(
|
|
54651
|
+
return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
|
|
54636
54652
|
}
|
|
54637
54653
|
function serializeModule(symbol, symbolName2, modifierFlags) {
|
|
54638
54654
|
const members = getNamespaceMembersForSerialization(symbol);
|
|
@@ -56904,7 +56920,7 @@ function createTypeChecker(host) {
|
|
|
56904
56920
|
true
|
|
56905
56921
|
);
|
|
56906
56922
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
56907
|
-
links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType :
|
|
56923
|
+
links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
|
|
56908
56924
|
}
|
|
56909
56925
|
return links.type;
|
|
56910
56926
|
}
|
|
@@ -64514,6 +64530,7 @@ function createTypeChecker(host) {
|
|
|
64514
64530
|
let errorInfo;
|
|
64515
64531
|
let relatedInfo;
|
|
64516
64532
|
let maybeKeys;
|
|
64533
|
+
let maybeKeysSet;
|
|
64517
64534
|
let sourceStack;
|
|
64518
64535
|
let targetStack;
|
|
64519
64536
|
let maybeCount = 0;
|
|
@@ -65383,9 +65400,13 @@ function createTypeChecker(host) {
|
|
|
65383
65400
|
}
|
|
65384
65401
|
if (!maybeKeys) {
|
|
65385
65402
|
maybeKeys = [];
|
|
65403
|
+
maybeKeysSet = /* @__PURE__ */ new Set();
|
|
65386
65404
|
sourceStack = [];
|
|
65387
65405
|
targetStack = [];
|
|
65388
65406
|
} else {
|
|
65407
|
+
if (maybeKeysSet.has(id)) {
|
|
65408
|
+
return 3 /* Maybe */;
|
|
65409
|
+
}
|
|
65389
65410
|
const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
|
|
65390
65411
|
source2,
|
|
65391
65412
|
target2,
|
|
@@ -65394,10 +65415,8 @@ function createTypeChecker(host) {
|
|
|
65394
65415
|
/*ignoreConstraints*/
|
|
65395
65416
|
true
|
|
65396
65417
|
) : void 0;
|
|
65397
|
-
|
|
65398
|
-
|
|
65399
|
-
return 3 /* Maybe */;
|
|
65400
|
-
}
|
|
65418
|
+
if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
|
|
65419
|
+
return 3 /* Maybe */;
|
|
65401
65420
|
}
|
|
65402
65421
|
if (sourceDepth === 100 || targetDepth === 100) {
|
|
65403
65422
|
overflow = true;
|
|
@@ -65406,6 +65425,7 @@ function createTypeChecker(host) {
|
|
|
65406
65425
|
}
|
|
65407
65426
|
const maybeStart = maybeCount;
|
|
65408
65427
|
maybeKeys[maybeCount] = id;
|
|
65428
|
+
maybeKeysSet.add(id);
|
|
65409
65429
|
maybeCount++;
|
|
65410
65430
|
const saveExpandingFlags = expandingFlags;
|
|
65411
65431
|
if (recursionFlags & 1 /* Source */) {
|
|
@@ -65458,17 +65478,34 @@ function createTypeChecker(host) {
|
|
|
65458
65478
|
if (result2) {
|
|
65459
65479
|
if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
|
|
65460
65480
|
if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
|
|
65461
|
-
|
|
65462
|
-
|
|
65463
|
-
|
|
65481
|
+
resetMaybeStack(
|
|
65482
|
+
/*markAllAsSucceeded*/
|
|
65483
|
+
true
|
|
65484
|
+
);
|
|
65485
|
+
} else {
|
|
65486
|
+
resetMaybeStack(
|
|
65487
|
+
/*markAllAsSucceeded*/
|
|
65488
|
+
false
|
|
65489
|
+
);
|
|
65464
65490
|
}
|
|
65465
|
-
maybeCount = maybeStart;
|
|
65466
65491
|
}
|
|
65467
65492
|
} else {
|
|
65468
65493
|
relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
|
|
65469
|
-
|
|
65494
|
+
resetMaybeStack(
|
|
65495
|
+
/*markAllAsSucceeded*/
|
|
65496
|
+
false
|
|
65497
|
+
);
|
|
65470
65498
|
}
|
|
65471
65499
|
return result2;
|
|
65500
|
+
function resetMaybeStack(markAllAsSucceeded) {
|
|
65501
|
+
for (let i = maybeStart; i < maybeCount; i++) {
|
|
65502
|
+
maybeKeysSet.delete(maybeKeys[i]);
|
|
65503
|
+
if (markAllAsSucceeded) {
|
|
65504
|
+
relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
|
|
65505
|
+
}
|
|
65506
|
+
}
|
|
65507
|
+
maybeCount = maybeStart;
|
|
65508
|
+
}
|
|
65472
65509
|
}
|
|
65473
65510
|
function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
|
|
65474
65511
|
const saveErrorInfo = captureErrorCalculationState();
|
|
@@ -70912,9 +70949,13 @@ function createTypeChecker(host) {
|
|
|
70912
70949
|
symbol,
|
|
70913
70950
|
/*excludes*/
|
|
70914
70951
|
111551 /* Value */
|
|
70915
|
-
) && !isInTypeQuery(location)
|
|
70952
|
+
) && !isInTypeQuery(location)) {
|
|
70916
70953
|
const target = resolveAlias(symbol);
|
|
70917
|
-
if (
|
|
70954
|
+
if (getSymbolFlags(
|
|
70955
|
+
symbol,
|
|
70956
|
+
/*excludeTypeOnlyMeanings*/
|
|
70957
|
+
true
|
|
70958
|
+
) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
|
|
70918
70959
|
if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
70919
70960
|
markAliasSymbolAsReferenced(symbol);
|
|
70920
70961
|
} else {
|
|
@@ -81717,9 +81758,6 @@ function createTypeChecker(host) {
|
|
|
81717
81758
|
if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
|
|
81718
81759
|
return;
|
|
81719
81760
|
}
|
|
81720
|
-
if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
|
|
81721
|
-
return;
|
|
81722
|
-
}
|
|
81723
81761
|
const symbol = getSymbolOfDeclaration(node);
|
|
81724
81762
|
if (symbol.flags & 1 /* FunctionScopedVariable */) {
|
|
81725
81763
|
if (!isIdentifier(node.name))
|
|
@@ -84341,7 +84379,7 @@ function createTypeChecker(host) {
|
|
|
84341
84379
|
}
|
|
84342
84380
|
return;
|
|
84343
84381
|
}
|
|
84344
|
-
const targetFlags =
|
|
84382
|
+
const targetFlags = getSymbolFlags(target);
|
|
84345
84383
|
const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0);
|
|
84346
84384
|
if (targetFlags & excludedMeanings) {
|
|
84347
84385
|
const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
|
|
@@ -84499,7 +84537,7 @@ function createTypeChecker(host) {
|
|
|
84499
84537
|
if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
|
|
84500
84538
|
const target = resolveAlias(getSymbolOfDeclaration(node));
|
|
84501
84539
|
if (target !== unknownSymbol) {
|
|
84502
|
-
const targetFlags =
|
|
84540
|
+
const targetFlags = getSymbolFlags(target);
|
|
84503
84541
|
if (targetFlags & 111551 /* Value */) {
|
|
84504
84542
|
const moduleName = getFirstIdentifier(node.moduleReference);
|
|
84505
84543
|
if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
|
|
@@ -84639,7 +84677,7 @@ function createTypeChecker(host) {
|
|
|
84639
84677
|
markExportAsReferenced(node);
|
|
84640
84678
|
}
|
|
84641
84679
|
const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
|
|
84642
|
-
if (!target ||
|
|
84680
|
+
if (!target || getSymbolFlags(target) & 111551 /* Value */) {
|
|
84643
84681
|
checkExpressionCached(node.propertyName || node.name);
|
|
84644
84682
|
}
|
|
84645
84683
|
}
|
|
@@ -84684,7 +84722,7 @@ function createTypeChecker(host) {
|
|
|
84684
84722
|
));
|
|
84685
84723
|
if (sym) {
|
|
84686
84724
|
markAliasReferenced(sym, id);
|
|
84687
|
-
if (
|
|
84725
|
+
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
84688
84726
|
checkExpressionCached(id);
|
|
84689
84727
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
|
|
84690
84728
|
error2(
|
|
@@ -85931,7 +85969,7 @@ function createTypeChecker(host) {
|
|
|
85931
85969
|
return symbolLinks2.exportsSomeValue;
|
|
85932
85970
|
function isValue(s) {
|
|
85933
85971
|
s = resolveSymbol(s);
|
|
85934
|
-
return s && !!(
|
|
85972
|
+
return s && !!(getSymbolFlags(s) & 111551 /* Value */);
|
|
85935
85973
|
}
|
|
85936
85974
|
}
|
|
85937
85975
|
function isNameOfModuleOrEnumDeclaration(node) {
|
|
@@ -86061,7 +86099,11 @@ function createTypeChecker(host) {
|
|
|
86061
86099
|
case 276 /* ImportSpecifier */:
|
|
86062
86100
|
case 281 /* ExportSpecifier */:
|
|
86063
86101
|
const symbol = getSymbolOfDeclaration(node);
|
|
86064
|
-
return !!symbol && isAliasResolvedToValue(
|
|
86102
|
+
return !!symbol && isAliasResolvedToValue(
|
|
86103
|
+
symbol,
|
|
86104
|
+
/*excludeTypeOnlyValues*/
|
|
86105
|
+
true
|
|
86106
|
+
);
|
|
86065
86107
|
case 278 /* ExportDeclaration */:
|
|
86066
86108
|
const exportClause = node.exportClause;
|
|
86067
86109
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
@@ -86078,7 +86120,7 @@ function createTypeChecker(host) {
|
|
|
86078
86120
|
const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
|
|
86079
86121
|
return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
|
|
86080
86122
|
}
|
|
86081
|
-
function isAliasResolvedToValue(symbol) {
|
|
86123
|
+
function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
|
|
86082
86124
|
if (!symbol) {
|
|
86083
86125
|
return false;
|
|
86084
86126
|
}
|
|
@@ -86086,7 +86128,12 @@ function createTypeChecker(host) {
|
|
|
86086
86128
|
if (target === unknownSymbol) {
|
|
86087
86129
|
return true;
|
|
86088
86130
|
}
|
|
86089
|
-
return !!((
|
|
86131
|
+
return !!(getSymbolFlags(
|
|
86132
|
+
symbol,
|
|
86133
|
+
excludeTypeOnlyValues,
|
|
86134
|
+
/*excludeLocalMeanings*/
|
|
86135
|
+
true
|
|
86136
|
+
) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
|
|
86090
86137
|
}
|
|
86091
86138
|
function isConstEnumOrConstEnumOnlyModule(s) {
|
|
86092
86139
|
return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
|
|
@@ -86100,7 +86147,7 @@ function createTypeChecker(host) {
|
|
|
86100
86147
|
return true;
|
|
86101
86148
|
}
|
|
86102
86149
|
const target = getSymbolLinks(symbol).aliasTarget;
|
|
86103
|
-
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ &&
|
|
86150
|
+
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
|
|
86104
86151
|
return true;
|
|
86105
86152
|
}
|
|
86106
86153
|
}
|
|
@@ -160444,6 +160491,11 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken
|
|
|
160444
160491
|
return cls;
|
|
160445
160492
|
}
|
|
160446
160493
|
break;
|
|
160494
|
+
case 81 /* PrivateIdentifier */:
|
|
160495
|
+
if (tryCast(location.parent, isPropertyDeclaration)) {
|
|
160496
|
+
return findAncestor(location, isClassLike);
|
|
160497
|
+
}
|
|
160498
|
+
break;
|
|
160447
160499
|
case 80 /* Identifier */: {
|
|
160448
160500
|
const originalKeywordKind = identifierToKeywordKind(location);
|
|
160449
160501
|
if (originalKeywordKind) {
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -5832,9 +5832,11 @@ declare namespace ts {
|
|
|
5832
5832
|
};
|
|
5833
5833
|
}) | ExportDeclaration & {
|
|
5834
5834
|
readonly isTypeOnly: true;
|
|
5835
|
+
readonly moduleSpecifier: Expression;
|
|
5835
5836
|
} | NamespaceExport & {
|
|
5836
5837
|
readonly parent: ExportDeclaration & {
|
|
5837
5838
|
readonly isTypeOnly: true;
|
|
5839
|
+
readonly moduleSpecifier: Expression;
|
|
5838
5840
|
};
|
|
5839
5841
|
};
|
|
5840
5842
|
type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration;
|