Skip to content

Conversation

jchavarri
Copy link
Member

No description provided.

let has_mel_for_js_payload (attrs : t) =
Ext_list.find_first attrs (fun { attr_name = { txt; loc }; _ } ->
warn_if_bs ~loc txt;
txt = "mel.for_js")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a mel.export might make more sense here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we chatted offline about reusing mel.as.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense also

@anmonteiro anmonteiro merged commit 51ce599 into anmonteiro/allow-exporting-invalid-identifiers Sep 4, 2023
@anmonteiro anmonteiro deleted the jchavarri/allow-exporting-invalid-identifiers branch September 4, 2023 22:34
@anmonteiro
Copy link
Member

Thanks, will continue in #714

anmonteiro added a commit that referenced this pull request Sep 4, 2023
* use for_js, don't export OCaml id

* add test to showcase consumption

* use mel.as

---------

Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
anmonteiro added a commit that referenced this pull request Sep 5, 2023
* feat: allow exporting invalid OCaml identifiers in JS

* setup

* `.mli` support

* add a reserved JS keyword in the test

* use for_js, don't export OCaml id (#718)

* use for_js, don't export OCaml id

* add test to showcase consumption

* use mel.as

---------

Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>

* s/Ext_list.find_first/List.find_opt

* add changelog entry

---------

Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants