Closed develop7 closed 4 years ago
As discussed on Discord: I like the idea and we're gonna put this in.
Just a note on your last remark (comment function): I believe this is too opinionated for an abstract ppx like this. Think the following cases:
Generally I believe this should be an implementation detail, esp. because most of the time these comments are used as developer information (inspecting the schema) rather than storing user facing values.
Generally I believe this should be an implementation detail, esp. because most of the time these comments are used as developer information (inspecting the schema) rather than storing user facing values.
good point, that belongs to the l10n, it's just me trying to do a shortcut prototyping the app
Sorry for being lazy and not following up on this! It looks like this functionality is coming natively to BuckleScript, so I guess we don't need this anymore.
In order to avoid end users writing to&from
string
boilerplate helpers (which are essential when, for instance, populating a<select>
with enum members) these should be generated by the ppx.Given the following enum
we have following type generated
and in order to populate selects with the values of that type we need to have them converted to strings
and other way around as well
I'd love to have these generated for me; or have
@bs.deriving jsConverter
cast upon.EDIT: removed irrelevant request