Skip to content

Conversation

francisbouvier
Copy link
Member

Closes #126
Relates to #49

Rationale: this feature has nothing to do with the Type init.
The idea is to get/set values on the JS object itself after
its instantiation.
Thoses actions are by definition dynamic and do not affect
the underling Type.
By consequence the corresponding Zig object will not have
those values.

Signed-off-by: Francis Bouvier <[email protected]>
@francisbouvier
Copy link
Member Author

I'm not happy with the name postJSObjectInst, maybe we can find better.

See my commit msg on f322ae8

@francisbouvier
Copy link
Member Author

At the end I was able to make this PR without depending on the Zig <> JS object map relation.

But of course once we have that we will have to update to call postJSObjectInst only when a new JS object is created, and not at each time a JS object is returned.

@francisbouvier francisbouvier marked this pull request as draft December 6, 2023 09:09
@krichprollsch
Copy link
Member

I'm not happy with the name postJSObjectInst, maybe we can find better.

What about calling it associate, couple, attach or link? since it's a func which will be called each time we have a zig instance linked or coupled with a js instance?

Split assertFuncHasParam to assertFuncHasParamT and assertFuncParamIsT
Better logic of strict parameter on assertFuncIsMethod

Signed-off-by: Francis Bouvier <[email protected]>
@francisbouvier francisbouvier marked this pull request as ready for review December 8, 2023 12:00
@francisbouvier francisbouvier merged commit 3dd792f into main Dec 8, 2023
@francisbouvier francisbouvier deleted the array_like branch December 8, 2023 13:52
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.

Array like syntax support
2 participants