output type annotations of type instantiation parameters - fixes #2036
This commit is contained in:
parent
3a74f6d4cc
commit
a523f60209
@ -252,7 +252,12 @@ export function TypeAnnotation(node, print) {
|
||||
|
||||
export function TypeParameterInstantiation(node, print) {
|
||||
this.push("<");
|
||||
print.join(node.params, { separator: ", " });
|
||||
print.join(node.params, {
|
||||
separator: ", ",
|
||||
iterator(node) {
|
||||
print.plain(node.typeAnnotation);
|
||||
}
|
||||
});
|
||||
this.push(">");
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ function foo():(_?:bool) => number{}
|
||||
function foo(): {} {}
|
||||
function foo<T>() {}
|
||||
function foo<T,S>() {}
|
||||
function foo<T: F>() {}
|
||||
a = function<T,S>() {};
|
||||
a = { set fooProp(value: number) {} };
|
||||
a = { set fooProp(value: number): void {} };
|
||||
|
||||
@ -16,6 +16,7 @@ function foo(): (_?: bool) => number {}
|
||||
function foo(): {} {}
|
||||
function foo<T>() {}
|
||||
function foo<T, S>() {}
|
||||
function foo<T: F>() {}
|
||||
a = function <T, S>() {};
|
||||
a = { set fooProp(value: number) {} };
|
||||
a = { set fooProp(value: number): void {} };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user