Closed ecamellini closed 5 years ago
After https://github.com/buildo/metarpheus/issues/73 is merged, we should add support for union types also in the TS generation.
The example shown in https://github.com/buildo/metarpheus/issues/73 should result in the following:
export interface First { arg: string; } export const First = t.interface( { arg: t.string }, 'First' ); export interface Second { arg: string; anotherArg: string; } export const Second = t.interface( { arg: t.string anotherArg: t.string }, 'Second' ); export type UnionExample = | First | Second
After https://github.com/buildo/metarpheus/issues/73 is merged, we should add support for union types also in the TS generation.
The example shown in https://github.com/buildo/metarpheus/issues/73 should result in the following: