Add support for "declare type" Flow syntax

See facebook/flow#1105
This commit is contained in:
Sam Goldman
2016-01-04 11:37:59 -08:00
parent 2516b7570f
commit e764346d5f
10 changed files with 275 additions and 0 deletions

View File

@@ -43,6 +43,11 @@ export function DeclareModule(node: Object) {
this.print(node.body, node);
}
export function DeclareTypeAlias(node: Object) {
this.push("declare ");
this.TypeAlias(node);
}
export function DeclareVariable(node: Object) {
this.push("declare var ");
this.print(node.id, node);