MakeTypes icon indicating copy to clipboard operation
MakeTypes copied to clipboard

Entity interface name is empty for Union in Array

Open Gowee opened this issue 4 years ago • 0 comments

Not sure how to properly name it. Here is a reproducible example:

Input:

{
    "coord": [
        {
            "lon": 14.42,
            "lat": 50.09
        },
        true
    ]
}

Expected:

export interface Weather {
  coord?: (CoordEntity | boolean)[] | null;
}
export interface CoordEntity {
  lon: number;
  lat: number;
}

Actual output:

export interface Weather {
  coord?: ( | boolean)[] | null;
}
export interface  {
  lon: number;
  lat: number;
}

Gowee avatar Nov 29 '20 12:11 Gowee