We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to write the following ( [@@js.enum] )
module String_or_number' : sig type t = [ `string of string [@js.default] | `Int of int [@js.default] ] [@@js.enum] val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t end = [%js]
It fails with Error: Sum types without js.* attribute not supported in this context
Error: Sum types without js.* attribute not supported in this context
The way to do it is currently ([@js.enum])
module String_or_number' : sig type t = [ `string of string [@js.default] | `Int of int [@js.default] ] [@js.enum] val t_to_js : t -> Ojs.t val t_of_js : Ojs.t -> t end = [%js]
It would be nice to support the first version.
The text was updated successfully, but these errors were encountered:
Fix #109
aa87b96
Remove js.attributes from generated code (#133)
9a646d0
* Simplify * More tests * Doc fixes * Typo * Remove attributes from generated type declarations * Accept tests after rebasing * Fix #109 * Fix indentation * Ok, it is fixed now. * Fix
Successfully merging a pull request may close this issue.
I'd like to write the following ( [@@js.enum] )
It fails with
Error: Sum types without js.* attribute not supported in this context
The way to do it is currently ([@js.enum])
It would be nice to support the first version.
The text was updated successfully, but these errors were encountered: