fix TSFunctionType (#1600)
parent
2fc6024a20
commit
c86a57a91e
|
@ -61,7 +61,6 @@
|
|||
"tests/typescript/conformance/types/variableDeclarator/jsfmt.spec.js",
|
||||
"tests/typescript/conformance/types/typeParameter/jsfmt.spec.js",
|
||||
"tests/typescript/custom/computedProperties/jsfmt.spec.js",
|
||||
"tests/typescript/conformance/types/functions/jsfmt.spec.js",
|
||||
"tests/typescript/custom/new/jsfmt.spec.js",
|
||||
"tests/typescript/custom/call/jsfmt.spec.js",
|
||||
"tests/typescript/custom/typeParameters/jsfmt.spec.js",
|
||||
|
|
|
@ -2732,11 +2732,8 @@ function printArgumentsList(path, options, print) {
|
|||
|
||||
function printFunctionTypeParameters(path, options, print) {
|
||||
const fun = path.getValue();
|
||||
// With TypeScript `typeParameters` is an array of `TSTypeParameter` and
|
||||
// with flow they are one `TypeParameterDeclaration` node.
|
||||
if (fun.type === "TSFunctionType") {
|
||||
return printTypeParameters(path, options, print, "typeParameters")
|
||||
} else if (fun.typeParameters) {
|
||||
|
||||
if (fun.typeParameters) {
|
||||
return path.call(print, "typeParameters");
|
||||
} else {
|
||||
return "";
|
||||
|
|
Loading…
Reference in New Issue