export interface ICallback { success?: (result?: T) => void; fail?: (result?: T) => void; complete?: (result?: T) => void; } export interface IBridgeOptions { method?: string; params?: IBridgeParams; success?: (result?: T) => void; fail?: (result?: T) => void; complete?: (result?: T) => void; [propName: string]: any; } export interface IBridgeParams { funType?: string; funName?: string; providerName?: string; [propName: string]: any; } interface IInfo { error_code: string; error_message: string; } /** * 桥接方法响应参数 */ export interface IBridgeResponse { info: IInfo; data: T; } /** * 存储 */ export interface IStorage { /** * native存储数据的key(key和multi_param必须传一个) */ key: string; /** * 向native保存的数据 * string | object */ value?: any; /** * native存储域 */ scope?: string; /** * file表示存储在存储器中,应用退出后数据仍然保存。memory表示缓存在内存中,应用退出后即被销毁。默认是file */ domain?: string; /** * 支持一次性读取多个值如[{key:key1,scope:scope1},{key:key2,scope:scope2}] */ multi_param?: Array; } export {};