@typescript-deploys/pr-build 5.2.0-pr-55224-27 → 5.2.0-pr-55224-37
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 +101 -67
- package/lib/tsserver.js +101 -70
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +101 -69
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +101 -68
- package/lib/typingsInstaller.js +2 -2
- 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-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230803`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -1302,31 +1302,6 @@ function trimEndImpl(s) {
|
|
|
1302
1302
|
function isNodeLikeSystem() {
|
|
1303
1303
|
return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
|
|
1304
1304
|
}
|
|
1305
|
-
function createStackSet() {
|
|
1306
|
-
var set = /* @__PURE__ */ new Set();
|
|
1307
|
-
var stack = [];
|
|
1308
|
-
var end = 0;
|
|
1309
|
-
return {
|
|
1310
|
-
has(value) {
|
|
1311
|
-
return set.has(value);
|
|
1312
|
-
},
|
|
1313
|
-
push(value) {
|
|
1314
|
-
set.add(value);
|
|
1315
|
-
stack[end] = value;
|
|
1316
|
-
end++;
|
|
1317
|
-
},
|
|
1318
|
-
popAll(callback) {
|
|
1319
|
-
while (end > 0) {
|
|
1320
|
-
end--;
|
|
1321
|
-
const value = stack[end];
|
|
1322
|
-
set.delete(value);
|
|
1323
|
-
if (callback(value)) {
|
|
1324
|
-
break;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
}
|
|
1330
1305
|
|
|
1331
1306
|
// src/compiler/debug.ts
|
|
1332
1307
|
var Debug;
|
|
@@ -34386,7 +34361,7 @@ var commandOptionsWithoutBuild = [
|
|
|
34386
34361
|
strictFlag: true,
|
|
34387
34362
|
category: Diagnostics.Type_Checking,
|
|
34388
34363
|
description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
34389
|
-
defaultValueDescription:
|
|
34364
|
+
defaultValueDescription: Diagnostics.false_unless_strict_is_set
|
|
34390
34365
|
},
|
|
34391
34366
|
{
|
|
34392
34367
|
name: "alwaysStrict",
|
|
@@ -44382,7 +44357,7 @@ function createTypeChecker(host) {
|
|
|
44382
44357
|
return symbol;
|
|
44383
44358
|
}
|
|
44384
44359
|
if (symbol.flags & 2097152 /* Alias */) {
|
|
44385
|
-
const targetFlags =
|
|
44360
|
+
const targetFlags = getSymbolFlags(symbol);
|
|
44386
44361
|
if (targetFlags & meaning) {
|
|
44387
44362
|
return symbol;
|
|
44388
44363
|
}
|
|
@@ -45142,7 +45117,7 @@ function createTypeChecker(host) {
|
|
|
45142
45117
|
/*isUse*/
|
|
45143
45118
|
false
|
|
45144
45119
|
));
|
|
45145
|
-
const allFlags = symbol &&
|
|
45120
|
+
const allFlags = symbol && getSymbolFlags(symbol);
|
|
45146
45121
|
if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) {
|
|
45147
45122
|
const rawName = unescapeLeadingUnderscores(name);
|
|
45148
45123
|
if (isES2015OrLaterConstructorName(name)) {
|
|
@@ -45878,11 +45853,23 @@ function createTypeChecker(host) {
|
|
|
45878
45853
|
}
|
|
45879
45854
|
return void 0;
|
|
45880
45855
|
}
|
|
45881
|
-
function
|
|
45882
|
-
|
|
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;
|
|
45883
45867
|
let seenSymbols;
|
|
45884
45868
|
while (symbol.flags & 2097152 /* Alias */) {
|
|
45885
|
-
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
|
+
}
|
|
45886
45873
|
if (target === unknownSymbol) {
|
|
45887
45874
|
return 67108863 /* All */;
|
|
45888
45875
|
}
|
|
@@ -45940,7 +45927,7 @@ function createTypeChecker(host) {
|
|
|
45940
45927
|
}
|
|
45941
45928
|
if (links.typeOnlyDeclaration) {
|
|
45942
45929
|
const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol);
|
|
45943
|
-
return
|
|
45930
|
+
return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0;
|
|
45944
45931
|
}
|
|
45945
45932
|
return void 0;
|
|
45946
45933
|
}
|
|
@@ -45951,7 +45938,11 @@ function createTypeChecker(host) {
|
|
|
45951
45938
|
const symbol = getSymbolOfDeclaration(node);
|
|
45952
45939
|
const target = resolveAlias(symbol);
|
|
45953
45940
|
if (target) {
|
|
45954
|
-
const markAlias = target === unknownSymbol ||
|
|
45941
|
+
const markAlias = target === unknownSymbol || getSymbolFlags(
|
|
45942
|
+
symbol,
|
|
45943
|
+
/*excludeTypeOnlyMeanings*/
|
|
45944
|
+
true
|
|
45945
|
+
) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target);
|
|
45955
45946
|
if (markAlias) {
|
|
45956
45947
|
markAliasSymbolAsReferenced(symbol);
|
|
45957
45948
|
}
|
|
@@ -45966,7 +45957,7 @@ function createTypeChecker(host) {
|
|
|
45966
45957
|
if (!node)
|
|
45967
45958
|
return Debug.fail();
|
|
45968
45959
|
if (isInternalModuleImportEqualsDeclaration(node)) {
|
|
45969
|
-
if (
|
|
45960
|
+
if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) {
|
|
45970
45961
|
checkExpressionCached(node.moduleReference);
|
|
45971
45962
|
}
|
|
45972
45963
|
}
|
|
@@ -46817,7 +46808,7 @@ function createTypeChecker(host) {
|
|
|
46817
46808
|
return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
|
|
46818
46809
|
}
|
|
46819
46810
|
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
46820
|
-
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ &&
|
|
46811
|
+
return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */);
|
|
46821
46812
|
}
|
|
46822
46813
|
function findConstructorDeclaration(node) {
|
|
46823
46814
|
const members = node.members;
|
|
@@ -47084,7 +47075,7 @@ function createTypeChecker(host) {
|
|
|
47084
47075
|
}
|
|
47085
47076
|
const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */);
|
|
47086
47077
|
symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
|
|
47087
|
-
const flags = shouldResolveAlias ?
|
|
47078
|
+
const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags;
|
|
47088
47079
|
if (flags & meaning) {
|
|
47089
47080
|
qualify = true;
|
|
47090
47081
|
return true;
|
|
@@ -49946,7 +49937,7 @@ function createTypeChecker(host) {
|
|
|
49946
49937
|
return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */));
|
|
49947
49938
|
}
|
|
49948
49939
|
function isTypeOnlyNamespace(symbol) {
|
|
49949
|
-
return every(getNamespaceMembersForSerialization(symbol), (m) => !(
|
|
49940
|
+
return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */));
|
|
49950
49941
|
}
|
|
49951
49942
|
function serializeModule(symbol, symbolName2, modifierFlags) {
|
|
49952
49943
|
const members = getNamespaceMembersForSerialization(symbol);
|
|
@@ -52218,7 +52209,7 @@ function createTypeChecker(host) {
|
|
|
52218
52209
|
true
|
|
52219
52210
|
);
|
|
52220
52211
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
52221
|
-
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;
|
|
52222
52213
|
}
|
|
52223
52214
|
return links.type;
|
|
52224
52215
|
}
|
|
@@ -59828,8 +59819,10 @@ function createTypeChecker(host) {
|
|
|
59828
59819
|
let errorInfo;
|
|
59829
59820
|
let relatedInfo;
|
|
59830
59821
|
let maybeKeys;
|
|
59822
|
+
let maybeKeysSet;
|
|
59831
59823
|
let sourceStack;
|
|
59832
59824
|
let targetStack;
|
|
59825
|
+
let maybeCount = 0;
|
|
59833
59826
|
let sourceDepth = 0;
|
|
59834
59827
|
let targetDepth = 0;
|
|
59835
59828
|
let expandingFlags = 0 /* None */;
|
|
@@ -60695,11 +60688,12 @@ function createTypeChecker(host) {
|
|
|
60695
60688
|
}
|
|
60696
60689
|
}
|
|
60697
60690
|
if (!maybeKeys) {
|
|
60698
|
-
maybeKeys =
|
|
60691
|
+
maybeKeys = [];
|
|
60692
|
+
maybeKeysSet = /* @__PURE__ */ new Set();
|
|
60699
60693
|
sourceStack = [];
|
|
60700
60694
|
targetStack = [];
|
|
60701
60695
|
} else {
|
|
60702
|
-
if (
|
|
60696
|
+
if (maybeKeysSet.has(id)) {
|
|
60703
60697
|
return 3 /* Maybe */;
|
|
60704
60698
|
}
|
|
60705
60699
|
const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
|
|
@@ -60710,7 +60704,7 @@ function createTypeChecker(host) {
|
|
|
60710
60704
|
/*ignoreConstraints*/
|
|
60711
60705
|
true
|
|
60712
60706
|
) : void 0;
|
|
60713
|
-
if (broadestEquivalentId &&
|
|
60707
|
+
if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) {
|
|
60714
60708
|
return 3 /* Maybe */;
|
|
60715
60709
|
}
|
|
60716
60710
|
if (sourceDepth === 100 || targetDepth === 100) {
|
|
@@ -60718,7 +60712,10 @@ function createTypeChecker(host) {
|
|
|
60718
60712
|
return 0 /* False */;
|
|
60719
60713
|
}
|
|
60720
60714
|
}
|
|
60721
|
-
|
|
60715
|
+
const maybeStart = maybeCount;
|
|
60716
|
+
maybeKeys[maybeCount] = id;
|
|
60717
|
+
maybeKeysSet.add(id);
|
|
60718
|
+
maybeCount++;
|
|
60722
60719
|
const saveExpandingFlags = expandingFlags;
|
|
60723
60720
|
if (recursionFlags & 1 /* Source */) {
|
|
60724
60721
|
sourceStack[sourceDepth] = source2;
|
|
@@ -60770,19 +60767,34 @@ function createTypeChecker(host) {
|
|
|
60770
60767
|
if (result2) {
|
|
60771
60768
|
if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
|
|
60772
60769
|
if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
|
|
60773
|
-
|
|
60774
|
-
|
|
60775
|
-
|
|
60776
|
-
|
|
60770
|
+
resetMaybeStack(
|
|
60771
|
+
/*markAllAsSucceeded*/
|
|
60772
|
+
true
|
|
60773
|
+
);
|
|
60777
60774
|
} else {
|
|
60778
|
-
|
|
60775
|
+
resetMaybeStack(
|
|
60776
|
+
/*markAllAsSucceeded*/
|
|
60777
|
+
false
|
|
60778
|
+
);
|
|
60779
60779
|
}
|
|
60780
60780
|
}
|
|
60781
60781
|
} else {
|
|
60782
60782
|
relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
|
|
60783
|
-
|
|
60783
|
+
resetMaybeStack(
|
|
60784
|
+
/*markAllAsSucceeded*/
|
|
60785
|
+
false
|
|
60786
|
+
);
|
|
60784
60787
|
}
|
|
60785
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
|
+
}
|
|
60786
60798
|
}
|
|
60787
60799
|
function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) {
|
|
60788
60800
|
const saveErrorInfo = captureErrorCalculationState();
|
|
@@ -66226,9 +66238,13 @@ function createTypeChecker(host) {
|
|
|
66226
66238
|
symbol,
|
|
66227
66239
|
/*excludes*/
|
|
66228
66240
|
111551 /* Value */
|
|
66229
|
-
) && !isInTypeQuery(location)
|
|
66241
|
+
) && !isInTypeQuery(location)) {
|
|
66230
66242
|
const target = resolveAlias(symbol);
|
|
66231
|
-
if (
|
|
66243
|
+
if (getSymbolFlags(
|
|
66244
|
+
symbol,
|
|
66245
|
+
/*excludeTypeOnlyMeanings*/
|
|
66246
|
+
true
|
|
66247
|
+
) & (111551 /* Value */ | 1048576 /* ExportValue */)) {
|
|
66232
66248
|
if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
|
|
66233
66249
|
markAliasSymbolAsReferenced(symbol);
|
|
66234
66250
|
} else {
|
|
@@ -77031,9 +77047,6 @@ function createTypeChecker(host) {
|
|
|
77031
77047
|
if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) {
|
|
77032
77048
|
return;
|
|
77033
77049
|
}
|
|
77034
|
-
if (node.kind === 260 /* VariableDeclaration */ && !node.initializer) {
|
|
77035
|
-
return;
|
|
77036
|
-
}
|
|
77037
77050
|
const symbol = getSymbolOfDeclaration(node);
|
|
77038
77051
|
if (symbol.flags & 1 /* FunctionScopedVariable */) {
|
|
77039
77052
|
if (!isIdentifier(node.name))
|
|
@@ -79301,10 +79314,22 @@ function createTypeChecker(host) {
|
|
|
79301
79314
|
return +expr.text;
|
|
79302
79315
|
case 217 /* ParenthesizedExpression */:
|
|
79303
79316
|
return evaluate(expr.expression, location);
|
|
79304
|
-
case 80 /* Identifier */:
|
|
79305
|
-
|
|
79306
|
-
|
|
79317
|
+
case 80 /* Identifier */: {
|
|
79318
|
+
const identifier = expr;
|
|
79319
|
+
if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName(
|
|
79320
|
+
identifier,
|
|
79321
|
+
111551 /* Value */,
|
|
79322
|
+
/*ignoreErrors*/
|
|
79323
|
+
true
|
|
79324
|
+
) === getGlobalSymbol(
|
|
79325
|
+
identifier.escapedText,
|
|
79326
|
+
111551 /* Value */,
|
|
79327
|
+
/*diagnostic*/
|
|
79328
|
+
void 0
|
|
79329
|
+
)) {
|
|
79330
|
+
return +identifier.escapedText;
|
|
79307
79331
|
}
|
|
79332
|
+
}
|
|
79308
79333
|
case 211 /* PropertyAccessExpression */:
|
|
79309
79334
|
if (isEntityNameExpression(expr)) {
|
|
79310
79335
|
const symbol = resolveEntityName(
|
|
@@ -79643,7 +79668,7 @@ function createTypeChecker(host) {
|
|
|
79643
79668
|
}
|
|
79644
79669
|
return;
|
|
79645
79670
|
}
|
|
79646
|
-
const targetFlags =
|
|
79671
|
+
const targetFlags = getSymbolFlags(target);
|
|
79647
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);
|
|
79648
79673
|
if (targetFlags & excludedMeanings) {
|
|
79649
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;
|
|
@@ -79801,7 +79826,7 @@ function createTypeChecker(host) {
|
|
|
79801
79826
|
if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
|
|
79802
79827
|
const target = resolveAlias(getSymbolOfDeclaration(node));
|
|
79803
79828
|
if (target !== unknownSymbol) {
|
|
79804
|
-
const targetFlags =
|
|
79829
|
+
const targetFlags = getSymbolFlags(target);
|
|
79805
79830
|
if (targetFlags & 111551 /* Value */) {
|
|
79806
79831
|
const moduleName = getFirstIdentifier(node.moduleReference);
|
|
79807
79832
|
if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
|
|
@@ -79941,7 +79966,7 @@ function createTypeChecker(host) {
|
|
|
79941
79966
|
markExportAsReferenced(node);
|
|
79942
79967
|
}
|
|
79943
79968
|
const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
|
|
79944
|
-
if (!target ||
|
|
79969
|
+
if (!target || getSymbolFlags(target) & 111551 /* Value */) {
|
|
79945
79970
|
checkExpressionCached(node.propertyName || node.name);
|
|
79946
79971
|
}
|
|
79947
79972
|
}
|
|
@@ -79986,7 +80011,7 @@ function createTypeChecker(host) {
|
|
|
79986
80011
|
));
|
|
79987
80012
|
if (sym) {
|
|
79988
80013
|
markAliasReferenced(sym, id);
|
|
79989
|
-
if (
|
|
80014
|
+
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
79990
80015
|
checkExpressionCached(id);
|
|
79991
80016
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
|
|
79992
80017
|
error(
|
|
@@ -80607,7 +80632,7 @@ function createTypeChecker(host) {
|
|
|
80607
80632
|
function copyLocallyVisibleExportSymbols(source, meaning2) {
|
|
80608
80633
|
if (meaning2) {
|
|
80609
80634
|
source.forEach((symbol) => {
|
|
80610
|
-
if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */)) {
|
|
80635
|
+
if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) {
|
|
80611
80636
|
copySymbol(symbol, meaning2);
|
|
80612
80637
|
}
|
|
80613
80638
|
});
|
|
@@ -81233,7 +81258,7 @@ function createTypeChecker(host) {
|
|
|
81233
81258
|
return symbolLinks2.exportsSomeValue;
|
|
81234
81259
|
function isValue(s) {
|
|
81235
81260
|
s = resolveSymbol(s);
|
|
81236
|
-
return s && !!(
|
|
81261
|
+
return s && !!(getSymbolFlags(s) & 111551 /* Value */);
|
|
81237
81262
|
}
|
|
81238
81263
|
}
|
|
81239
81264
|
function isNameOfModuleOrEnumDeclaration(node) {
|
|
@@ -81363,7 +81388,11 @@ function createTypeChecker(host) {
|
|
|
81363
81388
|
case 276 /* ImportSpecifier */:
|
|
81364
81389
|
case 281 /* ExportSpecifier */:
|
|
81365
81390
|
const symbol = getSymbolOfDeclaration(node);
|
|
81366
|
-
return !!symbol && isAliasResolvedToValue(
|
|
81391
|
+
return !!symbol && isAliasResolvedToValue(
|
|
81392
|
+
symbol,
|
|
81393
|
+
/*excludeTypeOnlyValues*/
|
|
81394
|
+
true
|
|
81395
|
+
);
|
|
81367
81396
|
case 278 /* ExportDeclaration */:
|
|
81368
81397
|
const exportClause = node.exportClause;
|
|
81369
81398
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
@@ -81380,7 +81409,7 @@ function createTypeChecker(host) {
|
|
|
81380
81409
|
const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
|
|
81381
81410
|
return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
|
|
81382
81411
|
}
|
|
81383
|
-
function isAliasResolvedToValue(symbol) {
|
|
81412
|
+
function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
|
|
81384
81413
|
if (!symbol) {
|
|
81385
81414
|
return false;
|
|
81386
81415
|
}
|
|
@@ -81388,7 +81417,12 @@ function createTypeChecker(host) {
|
|
|
81388
81417
|
if (target === unknownSymbol) {
|
|
81389
81418
|
return true;
|
|
81390
81419
|
}
|
|
81391
|
-
return !!((
|
|
81420
|
+
return !!(getSymbolFlags(
|
|
81421
|
+
symbol,
|
|
81422
|
+
excludeTypeOnlyValues,
|
|
81423
|
+
/*excludeLocalMeanings*/
|
|
81424
|
+
true
|
|
81425
|
+
) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
|
|
81392
81426
|
}
|
|
81393
81427
|
function isConstEnumOrConstEnumOnlyModule(s) {
|
|
81394
81428
|
return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
|
|
@@ -81402,7 +81436,7 @@ function createTypeChecker(host) {
|
|
|
81402
81436
|
return true;
|
|
81403
81437
|
}
|
|
81404
81438
|
const target = getSymbolLinks(symbol).aliasTarget;
|
|
81405
|
-
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ &&
|
|
81439
|
+
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
|
|
81406
81440
|
return true;
|
|
81407
81441
|
}
|
|
81408
81442
|
}
|