-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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
Labels
No labels