import { ICallHostMethodParams } from '@jolibox/types'; import { canIUse } from './can-i-use'; import { createCommands } from '@jolibox/common'; const commands = createCommands(); export async function callHostMethod(params: ICallHostMethodParams) { if (!canIUse('callHostMethod')) { return { code: 'FAILURE' as ResponseType, message: '[Jolibox SDK] callHostMethod is not supported in this platform' }; } return await commands.executeCommand('API.callHostMethod', params); }