callLocalApi()

in lib/connection.ts [144:150]


  callLocalApi(methodName: string, args: any[]) {
    const method = propertyByPath<Function>(this.localApi, methodName);
    if (!method) {
      throw new Error(`Local method "${methodName}" is not registered`);
    }
    return Promise.resolve(method.call(this, ...args));
  }