-
-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
When using enums, if useTypeImports
is set to true
, then generated code won't work since enums cannot be used as values. Example of generated code :
export const AddressTypeEnumSchema = yup.string<AddressTypeEnum>().oneOf([AddressTypeEnum.Billing, AddressTypeEnum.Delivery, AddressTypeEnum.FolderOrMission, AddressTypeEnum.HeadOffice, AddressTypeEnum.ResearchUnit, AddressTypeEnum.Residence, AddressTypeEnum.SecondaryOffice]).defined();
Alternatively, If useTypeImports
is set to false
, then generated import
instruction isn't perfectly valid :
Imports "XXX", "YYY" are only used as type.eslint[@typescript-eslint/consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers