Enable passing extra args to load function in classes derived from BaseModule#381
Merged
Enable passing extra args to load function in classes derived from BaseModule#381
Conversation
mkopcins
reviewed
Jun 9, 2025
| ...sources | ||
| ); | ||
| await this.nativeModule.loadModule(...paths); | ||
| await this.nativeModule.loadModule(...paths, ...loadArgs); |
Collaborator
There was a problem hiding this comment.
I dont think nativeModule accepts loadArgs
Contributor
Author
There was a problem hiding this comment.
Well, in some cases it can? What if we want to pass an extra argument to the native side load function? I see no downside. When you call this in derived class:
await super.load([modelSource, tokenizerSource], someArg);
you can expect that everything goes to the native side as it should
52a436a to
aeb603f
Compare
aeb603f to
2a541e8
Compare
mkopcins
approved these changes
Jun 12, 2025
mkopcins
pushed a commit
that referenced
this pull request
Oct 15, 2025
…seModule (#381) ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improves or adds clarity to existing documentation) ### Tested on - [x] iOS - [ ] Android ### Testing instructions Tested in CV object detection - it works ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Tested on
Testing instructions
Tested in CV object detection - it works
Checklist
Additional notes