quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

option to choose either `[]` or `Array<T>` in typescript

Open scarf005 opened this issue 2 years ago • 0 comments

image

currently generated type is inconsistent as it uses both [] and Array. it'd be good to be consistent with either by providing an option.

export type Comestible = {
    type:               string;
    result:             string;
    category:           string;
    subcategory:        string;
    skill_used:         string;
    difficulty:         number;
    time:               string;
    batch_time_factors: number[];
    book_learn:         BookLearn[][];
    qualities:          Quality[];
    tools:              BookLearn[][][];
    components:         BookLearn[][][];
}

export type BookLearn = number | string;

export type Quality = {
    id:    string;
    level: number;
}

scarf005 avatar May 22 '23 02:05 scarf005