Add support for "declare interface" Flow syntax

This has been a feature in Flow for a long time (couldn't easily find a
specific commit adding this). Interfaces are basically undocumented, though, so
it's easy to see how this was missed.
This commit is contained in:
Sam Goldman
2016-01-04 11:50:12 -08:00
parent e764346d5f
commit 26c97c4069
10 changed files with 316 additions and 0 deletions

View File

@@ -36,6 +36,11 @@ export function DeclareFunction(node: Object) {
this.semicolon();
}
export function DeclareInterface(node: Object) {
this.push("declare ");
this.InterfaceDeclaration(node);
}
export function DeclareModule(node: Object) {
this.push("declare module ");
this.print(node.id, node);