Flow changelog v0.257.0:
We have improved inference for exported primitive literal values.
Before this change the inferred type for export const obj = {f: "foo"}; was {f: str<"foo">}, where str<"foo"> was a type that opportunistically and unsoundly behaved either as string or as the singleton type "foo".
Flow will now infer the type {f: string} for obj.
For const like exports, e.g. export const x = "foo"; Flow will export the type "foo".
To fix errors that arise due to this change, you can provide annotations around exported literals or use the as const modifier.
So the problem is that constants are now exported as strings instead of literals if you use export { x }; syntax.
The solution is to add as const modifier or use export const x = "foo"; instead of const x = "foo"; export { x };. I opted for the former
because I didn't want to break exporting convention in the app.
Depends on D15015