MakeTypes
MakeTypes copied to clipboard
Recognize embedded types where type Eg = EgEntity | (EgEntity) [];
Some upstream converters from XML to Json, drop the array when it holds only one object.
I notice that
[{ "Eg": 0 }, [{"Eg": 1}] ]
produces the correct output.
export interface EgEntity { Eg: number; } export type Eg = EgEntity | (EgEntity)[] | null;
However, if Eg is inside a number of nested types, it is not recognized and children interfaces become Interface1 and Interface2.