-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
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
Export to JS output Struct::method logic upgrade #333
Comments
Hi, you can define alias as Currently we only support exporting plain functions, i.e. none methods. We do not export things at type level. |
Do you have plans to export others staff? I am thinking about how to export things as core domain objects (constants, functions, data types and others) in JS Project (Vue, Svelte...) The best way is to write directly on moonbit all site on Vue , Svelte... This is a question about plans of moonbit, and future capabilities. |
It is under discussion. We currently have generated |
No, at least in near future. We only support export functions for now. If you faced name conflicts, you can use this workaround:
|
Moonbit is great!
I am thinking about writing Core of my browser project on Moonbit.
I am trying to start and face export case (or problem)
I create test code of Xxx struct with new functionality
When I tried to export my class, object Xxx to my browser JavaScript I tryed this code
"new" is working, but result exported function is just named new
I think need to make some good model to make exported code more freandly and structured.
May be to allow "Xxx::new" to export with name Xxx_new or to allow any custom export name like. Or to make all Xxx methods export in container object Xxx { method1, method2 } to use as Xxx.method?
And the second question, is there way to export full Xxx struct with all functions and all related data?
Sorry for my bad english
The text was updated successfully, but these errors were encountered: