Skip to content

Is there a way to convert string type as strict type? #17

@dotennin

Description

@dotennin

e.g.
before

[
  {
    "ScriptId": "1",
    "ScriptCode": "NWRESTRN",
  },
  {
    "ScriptId": "2",
    "ScriptCode": "REPHSRESHP",
  }
]

after

Interface Script {
    ScriptId: '1' | '2',
    ScriptCode: 'NWRESTRN' | 'REPHSRESHP'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions