I am experimenting with the @as
decorator with the following code:
type status = [
@as("GOOD") #Good |
@as("BAD") #Bad
]
@val external setStatus: status => unit = "setStatus"
setStatus(#Good)
This compiles to:
setStatus("Good");
But I was expecting it would compile to:
setStatus("GOOD");
I suspect I am not using the decorator correctly. Any suggestions on how to correct this?
Thanks