typescript 5.2.0-dev.20230802 → 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 +99 -40
- package/lib/tsserver.js +104 -40
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +104 -40
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +104 -40
- package/lib/typingsInstaller.js +2 -2
- package/package.json +2 -2
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";
|
|
@@ -38763,7 +38763,7 @@ var commandOptionsWithoutBuild = [
|
|
|
38763
38763
|
strictFlag: true,
|
|
38764
38764
|
category: Diagnostics.Type_Checking,
|
|
38765
38765
|
description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
38766
|
-
defaultValueDescription:
|
|
38766
|
+
defaultValueDescription: Diagnostics.false_unless_strict_is_set
|
|
38767
38767
|
},
|
|
38768
38768
|
{
|
|
38769
38769
|
name: "alwaysStrict",
|
|
@@ -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))
|
|
@@ -83987,10 +84025,22 @@ function createTypeChecker(host) {
|
|
|
83987
84025
|
return +expr.text;
|
|
83988
84026
|
case 217 /* ParenthesizedExpression */:
|
|
83989
84027
|
return evaluate(expr.expression, location);
|
|
83990
|
-
case 80 /* Identifier */:
|
|
83991
|
-
|
|
83992
|
-
|
|
84028
|
+
case 80 /* Identifier */: {
|
|
84029
|
+
const identifier = expr;
|
|
84030
|
+
if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName(
|
|
84031
|
+
identifier,
|
|
84032
|
+
111551 /* Value */,
|
|
84033
|
+
/*ignoreErrors*/
|
|
84034
|
+
true
|
|
84035
|
+
) === getGlobalSymbol(
|
|
84036
|
+
identifier.escapedText,
|
|
84037
|
+
111551 /* Value */,
|
|
84038
|
+
/*diagnostic*/
|
|
84039
|
+
void 0
|
|
84040
|
+
)) {
|
|
84041
|
+
return +identifier.escapedText;
|
|
83993
84042
|
}
|
|
84043
|
+
}
|
|
83994
84044
|
case 211 /* PropertyAccessExpression */:
|
|
83995
84045
|
if (isEntityNameExpression(expr)) {
|
|
83996
84046
|
const symbol = resolveEntityName(
|
|
@@ -84329,7 +84379,7 @@ function createTypeChecker(host) {
|
|
|
84329
84379
|
}
|
|
84330
84380
|
return;
|
|
84331
84381
|
}
|
|
84332
|
-
const targetFlags =
|
|
84382
|
+
const targetFlags = getSymbolFlags(target);
|
|
84333
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);
|
|
84334
84384
|
if (targetFlags & excludedMeanings) {
|
|
84335
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;
|
|
@@ -84487,7 +84537,7 @@ function createTypeChecker(host) {
|
|
|
84487
84537
|
if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) {
|
|
84488
84538
|
const target = resolveAlias(getSymbolOfDeclaration(node));
|
|
84489
84539
|
if (target !== unknownSymbol) {
|
|
84490
|
-
const targetFlags =
|
|
84540
|
+
const targetFlags = getSymbolFlags(target);
|
|
84491
84541
|
if (targetFlags & 111551 /* Value */) {
|
|
84492
84542
|
const moduleName = getFirstIdentifier(node.moduleReference);
|
|
84493
84543
|
if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) {
|
|
@@ -84627,7 +84677,7 @@ function createTypeChecker(host) {
|
|
|
84627
84677
|
markExportAsReferenced(node);
|
|
84628
84678
|
}
|
|
84629
84679
|
const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol);
|
|
84630
|
-
if (!target ||
|
|
84680
|
+
if (!target || getSymbolFlags(target) & 111551 /* Value */) {
|
|
84631
84681
|
checkExpressionCached(node.propertyName || node.name);
|
|
84632
84682
|
}
|
|
84633
84683
|
}
|
|
@@ -84672,7 +84722,7 @@ function createTypeChecker(host) {
|
|
|
84672
84722
|
));
|
|
84673
84723
|
if (sym) {
|
|
84674
84724
|
markAliasReferenced(sym, id);
|
|
84675
|
-
if (
|
|
84725
|
+
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
84676
84726
|
checkExpressionCached(id);
|
|
84677
84727
|
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) {
|
|
84678
84728
|
error2(
|
|
@@ -85919,7 +85969,7 @@ function createTypeChecker(host) {
|
|
|
85919
85969
|
return symbolLinks2.exportsSomeValue;
|
|
85920
85970
|
function isValue(s) {
|
|
85921
85971
|
s = resolveSymbol(s);
|
|
85922
|
-
return s && !!(
|
|
85972
|
+
return s && !!(getSymbolFlags(s) & 111551 /* Value */);
|
|
85923
85973
|
}
|
|
85924
85974
|
}
|
|
85925
85975
|
function isNameOfModuleOrEnumDeclaration(node) {
|
|
@@ -86049,7 +86099,11 @@ function createTypeChecker(host) {
|
|
|
86049
86099
|
case 276 /* ImportSpecifier */:
|
|
86050
86100
|
case 281 /* ExportSpecifier */:
|
|
86051
86101
|
const symbol = getSymbolOfDeclaration(node);
|
|
86052
|
-
return !!symbol && isAliasResolvedToValue(
|
|
86102
|
+
return !!symbol && isAliasResolvedToValue(
|
|
86103
|
+
symbol,
|
|
86104
|
+
/*excludeTypeOnlyValues*/
|
|
86105
|
+
true
|
|
86106
|
+
);
|
|
86053
86107
|
case 278 /* ExportDeclaration */:
|
|
86054
86108
|
const exportClause = node.exportClause;
|
|
86055
86109
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
@@ -86066,7 +86120,7 @@ function createTypeChecker(host) {
|
|
|
86066
86120
|
const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node));
|
|
86067
86121
|
return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference);
|
|
86068
86122
|
}
|
|
86069
|
-
function isAliasResolvedToValue(symbol) {
|
|
86123
|
+
function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) {
|
|
86070
86124
|
if (!symbol) {
|
|
86071
86125
|
return false;
|
|
86072
86126
|
}
|
|
@@ -86074,7 +86128,12 @@ function createTypeChecker(host) {
|
|
|
86074
86128
|
if (target === unknownSymbol) {
|
|
86075
86129
|
return true;
|
|
86076
86130
|
}
|
|
86077
|
-
return !!((
|
|
86131
|
+
return !!(getSymbolFlags(
|
|
86132
|
+
symbol,
|
|
86133
|
+
excludeTypeOnlyValues,
|
|
86134
|
+
/*excludeLocalMeanings*/
|
|
86135
|
+
true
|
|
86136
|
+
) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target));
|
|
86078
86137
|
}
|
|
86079
86138
|
function isConstEnumOrConstEnumOnlyModule(s) {
|
|
86080
86139
|
return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
|
|
@@ -86088,7 +86147,7 @@ function createTypeChecker(host) {
|
|
|
86088
86147
|
return true;
|
|
86089
86148
|
}
|
|
86090
86149
|
const target = getSymbolLinks(symbol).aliasTarget;
|
|
86091
|
-
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ &&
|
|
86150
|
+
if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
|
|
86092
86151
|
return true;
|
|
86093
86152
|
}
|
|
86094
86153
|
}
|
|
@@ -160432,6 +160491,11 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken
|
|
|
160432
160491
|
return cls;
|
|
160433
160492
|
}
|
|
160434
160493
|
break;
|
|
160494
|
+
case 81 /* PrivateIdentifier */:
|
|
160495
|
+
if (tryCast(location.parent, isPropertyDeclaration)) {
|
|
160496
|
+
return findAncestor(location, isClassLike);
|
|
160497
|
+
}
|
|
160498
|
+
break;
|
|
160435
160499
|
case 80 /* Identifier */: {
|
|
160436
160500
|
const originalKeywordKind = identifierToKeywordKind(location);
|
|
160437
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;
|