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

Commit 5a324a3

Browse files
Pajnsoda0289
authored andcommitted
Fix: Preserve type parameters for methods (fixes #202) (#203)
1 parent bfb1506 commit 5a324a3

File tree

3 files changed

+422
-0
lines changed

3 files changed

+422
-0
lines changed

lib/ast-converter.js

+6
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,12 @@ module.exports = function(ast, extra) {
11901190
} else if (!result.static && node.name.kind === SyntaxKind.StringLiteral && node.name.text === "constructor") {
11911191
result.kind = "constructor";
11921192
}
1193+
1194+
// Process typeParameters
1195+
if (node.typeParameters && node.typeParameters.length) {
1196+
method.typeParameters = convertTSTypeParametersToTypeParametersDeclaration(node.typeParameters);
1197+
}
1198+
11931199
break;
11941200

11951201
// TypeScript uses this even for static methods named "constructor"

0 commit comments

Comments
 (0)