Skip to content

Commit 1a26e95

Browse files
Dominic Geeblakeembrey
Dominic Gee
authored andcommitted
Include type arguments when converting aliases (#452)
1 parent de263c0 commit 1a26e95

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/converter/types/alias.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ export class AliasConverter extends ConverterTypeComponent implements TypeNodeCo
7272
*/
7373
convertNode(context: Context, node: ts.TypeReferenceNode): ReferenceType {
7474
const name = _ts.getTextOfNode(node.typeName);
75-
return new ReferenceType(name, ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME);
75+
const result = new ReferenceType(name, ReferenceType.SYMBOL_ID_RESOLVE_BY_NAME);
76+
77+
if (node.typeArguments) {
78+
result.typeArguments = node.typeArguments.map(n => this.owner.convertType(context, n));
79+
}
80+
81+
return result;
7682
}
7783
}

0 commit comments

Comments
 (0)