Repository navigation
Replies: 2 comments 1 reply
|
Hi @nckrtl, We (at Spatie) actually don't use native enums (so the value is |
1 reply
|
String enums are very useful for using actual values in FE code. I think it would be a great addition for those cases where you consciously opt into string enum use. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to using the enums exported by this package in Vue, but they don't seem usable. I'm exporting my enums to native TS enums with the config option:
'transform_to_native_enums' => true,. The generated enums in generated.d.ts are looking fine:However I can't reference the enum as I get an "Can't find variable: App" error. As I understand the enums are only available for Typescript references but can't be used as values in Vue. Is there a way to accomplish this? Ideally I'd like to use the enums in generated.d.ts instead of manually maintaining an separate enums file.
All reactions