Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit e88a9a4

Browse files
committed
New: Normalzie type parameters
1 parent 4d755ed commit e88a9a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/ast-converter.js

+8
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,14 @@ module.exports = function(ast, extra) {
678678
}).forEach(function(key) {
679679
if (key === "type") {
680680
result.typeAnnotation = (node.type) ? convertTypeAnnotation(node.type) : null;
681+
} else if (key === "typeArguments") {
682+
result.typeParameters = (node.typeArguments)
683+
? convertTypeArgumentsToTypeParameters(node.typeArguments)
684+
: null;
685+
} else if (key === "typeParameters") {
686+
result.typeParameters = (node.typeParameters)
687+
? convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters)
688+
: null;
681689
} else {
682690
if (Array.isArray(node[key])) {
683691
result[key] = node[key].map(convertChild);

0 commit comments

Comments
 (0)