We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fe4183 commit 75d4bbfCopy full SHA for 75d4bbf
2 files changed
js/NativeOnfidoModule.ts
@@ -1,7 +1,7 @@
1
import { TurboModuleRegistry, TurboModule } from "react-native";
2
3
export interface Spec extends TurboModule {
4
- start(config: Object): Promise<string>;
+ start(config: Object): Promise<Object>;
5
}
6
7
export default TurboModuleRegistry.getEnforcing<Spec>("RNOnfidoSdk");
js/Onfido.ts
@@ -9,7 +9,7 @@ import {
9
OnfidoResult
10
} from "./config_constants";
11
12
-const { OnfidoSdk } = NativeModules;
+import OnfidoSdk from "./NativeOnfidoModule";
13
14
const Onfido = {
15
start(config: OnfidoConfig): Promise<OnfidoResult | OnfidoError> {
@@ -68,7 +68,7 @@ const Onfido = {
68
return OnfidoSdk.start(config).catch((error: any) => {
69
console.log(error);
70
throw error;
71
- });
+ }) as Promise<OnfidoResult | OnfidoError>;
72
73
};
74
0 commit comments