interface.uts 675 字节
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5 6 7 8 9 10
export type SyncOptions = {
    success ?: (res : string) => void
    fail ?: (res : string) => void
    complete ?: (res : string) => void
}
export interface RequestTask {
    url : string
    abort() : RequestTask
    onCallback(callback : (res : string) => void) : void
    sync(options : SyncOptions) : string
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
}

export type AsyncOptions = {
  type : string;
  success : (res : string) => void;
  fail : (res : string) => void;
  complete : (res : string) => void;
};

export type SyntaxResult = {
  name : string
};

export type SyncResult = {
  msg : string
}

export type TestOptions = {
  name : string;
  callback : (res : string) => void;
};