deezer/KustomExport

Exported enum instance not guaranteed

neovov opened this issue ยท 1 comments

Hi,

Feel free to rename this issue so it is clearer for you ๐Ÿ˜‰ .

With this Kotlin enum:

@KustomExport
public enum class Bar() {
    FIRST, SECOND
}

And this TypeScript code:

const bar = fooInstance.bar // Bar_FIRST
if (bar === Bar_FIRST) {
  console.log('First');
}

The enum instance returned on fooInstance is not guaranteed to be an exported instance of Bar (for example in this case there will be no console.log).

(Hi @glureau ๐Ÿ‘‹ )

Fixed by 76f4584
Available in 0.2.0