Merge pull request #3203 from samwgoldman/flow-mixins-6.x

Add support for mixins to Babel 6.x
This commit is contained in:
Sebastian McKenzie
2015-12-27 21:04:40 +00:00
10 changed files with 240 additions and 0 deletions

View File

@@ -104,6 +104,10 @@ export function _interfaceish(node: Object) {
this.push(" extends ");
this.printJoin(node.extends, node, { separator: ", " });
}
if (node.mixins && node.mixins.length) {
this.push(" mixins ");
this.printJoin(node.mixins, node, { separator: ", " });
}
this.space();
this.print(node.body, node);
}

View File

@@ -9,3 +9,4 @@ declare class A<T> extends B<T> { x: number }
declare class A { static foo(): number; static x : string }
declare class A { static [ indexer: number]: string }
declare class A { static () : number }
declare class A mixins B<T>, C {}

View File

@@ -9,3 +9,4 @@ declare class A<T> extends B<T> { x: number }
declare class A { static foo(): number; static x: string; }
declare class A { static [indexer: number]: string }
declare class A { static (): number }
declare class A mixins B<T>, C {}