/** * Call native api */ import { ExtSdkApiRN } from '../__specs__'; import { ChatError } from '../common/ChatError'; export class Native { protected static checkErrorFromResult(result: any): void { if (result?.error) { throw new ChatError(result.error); } } protected static _callMethod(method: string, args?: Object): Promise { return ExtSdkApiRN.callMethod(method, args); } }