Closed dannynelson closed 7 years ago
It already supported. https://github.com/morlay/json-schema-to-flow-type/blob/master/src/FlowSchema.js#L145
At least for simple schema.
parseSchema({
id: "Test",
type: [ "string", "number" ],
});
will be
export type Test = string | number;
BTW, I am giving up Flow.js and moving to TypeScript.
flow-bin
is really slow and flow-typed
make me crazy.
So I am not sure I can continue maintain this package without focusing Flow.js. Could you take over this package?
@morlay ok, I will come up with a more specific test to reproduce.
Yes, my company, goodeggs, can take over the module.
Can you also add goodeggs
as an owner of the npm package?
Cool,I can't transfer to goodeggs, so to you first. npm added goodeggs. Thanks ~
Great, thanks!
A json schema supports defining union types:
This should convert to a flow union type: