Skip to content

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

@timagixe

Description

@timagixe

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions