Skip to content

Commit 61f0c7a

Browse files
committed
Fewer symbol instantiations / discard type mapper after instantiation
1 parent 163ba2f commit 61f0c7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9692,6 +9692,7 @@ namespace ts {
96929692
type = errorType;
96939693
}
96949694
symbol.type = type;
9695+
symbol.mapper = undefined!;
96959696
}
96969697
return symbol.type;
96979698
}
@@ -13663,7 +13664,7 @@ namespace ts {
1366313664

1366413665
function instantiateSymbol(symbol: Symbol, mapper: TypeMapper): Symbol {
1366513666
const links = getSymbolLinks(symbol);
13666-
if (links.type && !maybeTypeOfKind(links.type, TypeFlags.Object | TypeFlags.Instantiable)) {
13667+
if (links.type && !couldContainTypeVariables(links.type)) {
1366713668
// If the type of the symbol is already resolved, and if that type could not possibly
1366813669
// be affected by instantiation, simply return the symbol itself.
1366913670
return symbol;

0 commit comments

Comments
 (0)