Thanks for this article! I am using this technique to binding enumerations in the @pixi/constants package (here: github.com/pixijs/pixi.js/blob/dev...).
Hi, no problem. Yes the first code sample looks correct to me. If you add the [@bs.inline] attribute in the correct places as explained in the post, the compiler will generate constant literals at the right places.
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for this article! I am using this technique to binding enumerations in the @pixi/constants package (here: github.com/pixijs/pixi.js/blob/dev...).
instead of
Do you think this would be the correct approach?
Hi, no problem. Yes the first code sample looks correct to me. If you add the
[@bs.inline]
attribute in the correct places as explained in the post, the compiler will generate constant literals at the right places.