//------------------------------------------------------------------------------ // Types //------------------------------------------------------------------------------ export interface RPCQuery { model: string; method: string; args: any; } export interface IAjax { rpc(rpc: RPCQuery): Promise; } //------------------------------------------------------------------------------ // Ajax //------------------------------------------------------------------------------ export class Ajax implements IAjax { rpc(rpc: RPCQuery): Promise { return Promise.resolve(1); } }