UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

24 lines (21 loc) • 701 B
import { NitroModules } from "react-native-nitro-modules"; import { rethrowNativeError } from "../nativeError.native.js"; var hybrid; function callNativeSource(module, method, args, contractHash) { hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = NitroModules.createHybridObject("OneNativeModules"); return hybrid.call(module, method, JSON.stringify(args), contractHash).then(function(value) { return JSON.parse(value); }).catch(function(error) { try { rethrowNativeError(error); } catch (coded) { if (coded instanceof Error) Object.assign(coded, { module, method }); throw coded; } }); } export { callNativeSource }; //# sourceMappingURL=index.native.js.map