UNPKG

@asteriskzuo/react-native-easemob

Version:
22 lines (20 loc) 509 B
/** * Call native api */ import { ChatError } from '../common/ChatError'; import { NativeModules } from 'react-native'; const { ExtSdkApiRN } = NativeModules; console.log('ExtSdkApiRN: ', ExtSdkApiRN); export class Native { static hasErrorFromResult(result) { if (result !== null && result !== void 0 && result.error) { throw new ChatError(result.error); } } static _callMethod(method, args) { return ExtSdkApiRN.callMethod(method, args); } } //# sourceMappingURL=Native.js.map