Skip to content

Commit 8842bad

Browse files
committed
fix.
1 parent 21bbe6b commit 8842bad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/checker.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -12195,13 +12195,12 @@ namespace ts {
1219512195

1219612196
// or this one? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias
1219712197
function getTypeParametersFromTypeConstructorSymbol(symbol: Symbol) {
12198+
const type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol)); // this has work even in TypeAlias condition -- it give typeParameters value if there is not.
1219812199
if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
12199-
const type = <InterfaceType>getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
12200-
const typeParameters = type.localTypeParameters;
12200+
const typeParameters = (<InterfaceType>type).localTypeParameters;
1220112201
return typeParameters;
1220212202
}
1220312203
if (symbol.flags & SymbolFlags.TypeAlias) {
12204-
// const type = getDeclaredTypeOfSymbol(symbol);
1220512204
const links = getSymbolLinks(symbol);
1220612205
const typeParameters = links.typeParameters;
1220712206
return typeParameters;

0 commit comments

Comments
 (0)