quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

TypeScript: patterns in keys like `Id` or `Ids` are uppercased after transformation

Open timagixe opened this issue 2 years ago • 0 comments

Hi there!

I have found your service pretty useful. Thank you!

Working with typescript and converting massive JSONs to TS types I have found the following issue:

JSON keys that have id or ids in its name like below:

{
    "localeId": [1, 2],
    "localeIds": [1, 2]
}

Are uppercased after transformation to a TS type.

export interface Pokedex {
    localeID:  number[];
    localeIDS: number[];
}

This behavior is not expected. (i.e. in JS / JS PropTypes it is not observed)

timagixe avatar May 12 '22 11:05 timagixe