Add ";" token to the end of TS construct & call signature declaration (#10258)

* Add ";" token to the end of TS construct signature declaration

* Add ";" token to the end of TS call signature declaration. Update construct signature test fixtures
This commit is contained in:
Serhii Muryhin 2019-07-25 11:14:35 +03:00 committed by Nicolò Ribaudo
parent 4d12c8971b
commit 4d30379d36
5 changed files with 10 additions and 4 deletions

View File

@ -67,12 +67,14 @@ export function TSQualifiedName(node) {
export function TSCallSignatureDeclaration(node) {
this.tsPrintSignatureDeclarationBase(node);
this.token(";");
}
export function TSConstructSignatureDeclaration(node) {
this.word("new");
this.space();
this.tsPrintSignatureDeclarationBase(node);
this.token(";");
}
export function TSPropertySignature(node) {

View File

@ -1,3 +1,4 @@
interface I {
(x: number): void;
(x: string): void;
}

View File

@ -1,3 +1,4 @@
interface I {
(x: number): void
}
(x: number): void;
(x: string): void;
}

View File

@ -1,3 +1,4 @@
interface I {
new (x: number): void;
new (x: string): void;
}

View File

@ -1,3 +1,4 @@
interface I {
new (x: number): void
}
new (x: number): void;
new (x: string): void;
}