Skip to content

export currency list ( isoly.Currency) #144

@juantergiro

Description

@juantergiro

https://github.com/utily/isoly/blob/master/Currency.ts
In the following file. Can we export the Currency type array (export line 3)?

https://github.com/utily/isoly/blob/master/CountryCode/Alpha3.ts

just like it is done here in line 7 ?

The reason for this to reuse this list so we can feed it into zod.enum(<>) constructor and have one source of truth for validation of these In front-end ?

We are exporting a similar type where we use the spread operator in line 187 of Currency.ts

line 187 export const types: Currency[] = [...currencies]

But it doesn't produce the same type and it cannot be fed into zod.enum without doing any type conversions.

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