Flow-remove-types does not handle functions/object without explicit argument/key names
mourner opened this issue · 4 comments
mourner commented
// works
type A = {[key: string]: string};
type B = (foo: string) => string;
// works in flow, but flow-remove-types fails
type A = {[string]: string};
type B = (string) => string;
Flow documentation is not clear on the syntax and whether omitting names like this should be allowed, but Flow 0.35 parses such definitions without any errors. So flow-remove-types
probably should too. cc @leebyron
hzoo commented
@mourner this is a new flow feature - it's not supported since babylon just added it and it's not released yet either babel/babylon#197
hzoo commented
It's possible that flow-remove-types may need it's own changes after we release (soon) but just fyi yeah
hzoo commented
https://twitter.com/TschinderDaniel/status/798916219738976256 we released https://github.com/babel/babylon/releases/tag/v6.14.0 so install babylon again and check again?