Fix generation flow unnamed computed property (#7095)
This commit is contained in:
parent
035286a810
commit
d25918aa5d
@ -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(":");
|
||||
|
||||
@ -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 };
|
||||
|
||||
@ -22,3 +22,9 @@ type T = {
|
||||
type T = {
|
||||
foo: () => number
|
||||
};
|
||||
type T = {
|
||||
[string]: U
|
||||
};
|
||||
type T = {
|
||||
[param: string]: U
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user