MakeTypes icon indicating copy to clipboard operation
MakeTypes copied to clipboard

Recognize embedded types where type Eg = EgEntity | (EgEntity) [];

Open Guy--L opened this issue 5 years ago • 0 comments

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.

Guy--L avatar Oct 04 '19 13:10 Guy--L