Skip to content

Commit 75d4bbf

Browse files
authored
Update import and codegen
1 parent 7fe4183 commit 75d4bbf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

js/NativeOnfidoModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TurboModuleRegistry, TurboModule } from "react-native";
22

33
export interface Spec extends TurboModule {
4-
start(config: Object): Promise<string>;
4+
start(config: Object): Promise<Object>;
55
}
66

77
export default TurboModuleRegistry.getEnforcing<Spec>("RNOnfidoSdk");

js/Onfido.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
OnfidoResult
1010
} from "./config_constants";
1111

12-
const { OnfidoSdk } = NativeModules;
12+
import OnfidoSdk from "./NativeOnfidoModule";
1313

1414
const Onfido = {
1515
start(config: OnfidoConfig): Promise<OnfidoResult | OnfidoError> {
@@ -68,7 +68,7 @@ const Onfido = {
6868
return OnfidoSdk.start(config).catch((error: any) => {
6969
console.log(error);
7070
throw error;
71-
});
71+
}) as Promise<OnfidoResult | OnfidoError>;
7272
}
7373
};
7474

0 commit comments

Comments
 (0)