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
which is an error because Type mismatch: inferred type is E.Companion but E was expected in the last line. The incorrect assumption is made that the companion object is an enum value.
Workaround: Use JsExport instead of KustomExport
The text was updated successfully, but these errors were encountered:
I don't think this will be supported: KustomExport goal was to provide enum support in older Kotlin version, now that newest Kotlin supports it, it's more than advised to use JsExport (unfortunately there's no doc saying that today). Using KustomExport on an enum is only adding more code to your js bundle, passthrough code so possible performance impact and the exposed syntax is not the Kotlin one.
I may remove the enum support completely in a future version.
That's a fair point but wouldn't KustomExport still provide better functionality in some cases? For example if you want to have a property of type List in the enum.
It could but I believe some simple workarounds can be found, it's a matter of trade-off so some may need it. As I don't use this tool myself anymore I won't be able to spend time on it on a foreseeable future, feel free to open a PR if you want this feature though.
generates
which is an error because
Type mismatch: inferred type is E.Companion but E was expected
in the last line. The incorrect assumption is made that the companion object is an enum value.Workaround: Use JsExport instead of KustomExport
The text was updated successfully, but these errors were encountered: