Skip to content
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

JS Functions can accept Javascript objects #734

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ambiguousname
Copy link
Member

@ambiguousname ambiguousname commented Nov 21, 2024

Fixes #720.

TODO:

  • Add test for nested struct construction
  • Don't think nested structs are actually recognized yet. Need to update struct construction code to fix this.
  • Label parameters correctly in typescript
  • StructTypeName_Obj with recursive structs also need StructTypeName | StructTypeName_Obj labeling in typescript

@ambiguousname ambiguousname added the B-js JS backend label Nov 21, 2024
Copy link
Contributor

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

Nice. I wodner if we should also make this clear in the typescript types or let it be under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-js JS backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JS2 constructors: structs and enums should autoconvert at parameter/struct boundaries
2 participants