You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is specially useful when using enumStyle is alias.
In this case it is not possible to iterate over all enum items, as they only exist at compilation time.
However, in some particular cases this is useful.
So, the idea is to add a new boolean option enumArray (default false) to generate a ts file next to the enum file, suffixed with -array.ts, which exports a const with all enum items in an array.
This file isn't even included in the model index (models.ts).
This way the overhead on generated code is minimal, and will only include arrays of actually used enums.
The text was updated successfully, but these errors were encountered:
This is specially useful when using
enumStyle
isalias
.In this case it is not possible to iterate over all enum items, as they only exist at compilation time.
However, in some particular cases this is useful.
So, the idea is to add a new boolean option
enumArray
(default false) to generate a ts file next to the enum file, suffixed with-array.ts
, which exports a const with all enum items in an array.This file isn't even included in the model index (
models.ts
).This way the overhead on generated code is minimal, and will only include arrays of actually used enums.
The text was updated successfully, but these errors were encountered: