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

@@ -12,3 +12,5 @@ declare class A { static () : number }
declare class A mixins B<T>, C {}
declare type A = string
declare type T<U> = { [k:string]: U }
declare interface I { foo: string }
declare interface I<T> { foo: T }

View File

@@ -12,3 +12,5 @@
/*:: declare class A mixins B<T>, C {}*/
/*:: declare type A = string*/
/*:: declare type T<U> = { [k:string]: U }*/
/*:: declare interface I { foo: string }*/
/*:: declare interface I<T> { foo: T }*/