File tree Expand file tree Collapse file tree
packages/react-native-executorch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ dependencies {
161161 implementation " com.facebook.react:react-android:+"
162162 implementation " com.facebook.react:react-native:+"
163163 implementation ' com.facebook.fbjni:fbjni:0.6.0'
164- implementation ' org.opencv:opencv:4.10.0'
165164 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
166165 implementation(" com.github.software-mansion:react-native-executorch:main-SNAPSHOT" )
167166 implementation ' org.opencv:opencv:4.10.0'
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const useNonStaticModule = <
1414 M extends Module ,
1515 LoadArgs extends Parameters < M [ 'load' ] > ,
1616 ForwardArgs extends any [ ] ,
17- ForwardReturn ,
17+ ForwardReturn extends Awaited < ReturnType < M [ 'forward' ] > > ,
1818> ( {
1919 module,
2020 loadArgs,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export class ImageSegmentationModule {
2121 imageSource : string ,
2222 classesOfInterest ?: DeeplabLabel [ ] ,
2323 resize ?: boolean
24- ) {
24+ ) : promise < { [ key in DeeplabLabel ] ?: number [ ] } > {
2525 if ( this . nativeModule == null ) {
2626 throw new Error ( getError ( ETError . ModuleNotLoaded ) ) ;
2727 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export class StyleTransferModule {
1616 this . nativeModule = global . loadStyleTransfer ( paths [ 0 ] || '' ) ;
1717 }
1818
19- async forward ( imageSource : string ) {
19+ async forward ( imageSource : string ) : Promise < string > {
2020 if ( this . nativeModule == null )
2121 throw new Error ( getError ( ETError . ModuleNotLoaded ) ) ;
2222 return await this . nativeModule . forward ( imageSource ) ;
You can’t perform that action at this time.
0 commit comments