Skip to content

Commit

Permalink
Fix generation flow unnamed computed property (#7095)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored and existentialism committed Dec 22, 2017
1 parent 035286a commit d25918a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/babel-generator/src/generators/flow.js
Expand Up @@ -420,9 +420,11 @@ export function ObjectTypeIndexer(node: Object) {
}
this._variance(node);
this.token("[");
this.print(node.id, node);
this.token(":");
this.space();
if (node.id) {
this.print(node.id, node);
this.token(":");
this.space();
}
this.print(node.key, node);
this.token("]");
this.token(":");
Expand Down
Expand Up @@ -7,3 +7,5 @@ type T = { ...U, p: V, };
type T = { ...{}|{ p: V, }};
type T = { foo(): number }
type T = { foo: () => number }
type T = { [string]: U };
type T = { [param: string]: U };
Expand Up @@ -22,3 +22,9 @@ type T = {
type T = {
foo: () => number
};
type T = {
[string]: U
};
type T = {
[param: string]: U
};

0 comments on commit d25918a

Please sign in to comment.