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

fix: Remove unused args parameter in createHybridObject(..) #145

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

mrousavy
Copy link
Owner

Parameter was unused anyways, so remove it.

Hybrid Objects that can be default-constructed using createHybridObject(..) should not take any arguments anyways, as this just overly complicates things (how do we parse the args? Do we convert them to Swift/Kotlin types? How do we length-check them? It needs to be compile-time, etc), as well as potentially uses unsafe typings (we are not in a Nitro context yet so we cannot use the JSIConverter template stuff).

If you need arguments here, create a default-constructible "factory" HybridObject first, then create your other HybridObjects from that factory with some helper methods - those are fast, type-safe, and compile-time generated.

@mrousavy mrousavy merged commit adeffda into main Sep 23, 2024
12 checks passed
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.

1 participant