Support TS 4.2 abstract constructor signature (#10418)

This commit is contained in:
Sosuke Suzuki authored and GitHub committed 2021-02-28 22:00:17 +02:00
1 parent 001189677d
commit fc396277fc
4 files changed
+45

No files matched your search

+3
View File
@@ -296,6 +296,9 @@ function printTypescript(path, options, print) {
case "TSConstructSignatureDeclaration":
case "TSCallSignatureDeclaration":
case "TSConstructorType": {
if (n.type === "TSConstructorType" && n.abstract) {
parts.push("abstract ");
}
if (n.type !== "TSCallSignatureDeclaration") {
parts.push("new ");
}