Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Is there a way to get the name of variant in type

$
0
0

@tsnobip Hi, thanks for your quick response. why we need to define module here?

If I remove module

module Foo: {
  type t = Bar | Baz
  let elements: array<t>
} = {

the warn was gone.

And if some type like

type result =
| Ok
| Error
| ErrCode(int)

I need to extract the TAG name by some raw JS code?

playground


Viewing all articles
Browse latest Browse all 2592

Trending Articles