ts-sdk

callback.ts 313B

123456789101112131415
  1. interface ReadyStateCallback {
  2. onOpen(ev: Event): void;
  3. onError(ev: Event): void;
  4. onClose(ev: Event): void;
  5. }
  6. interface RequestCallback {
  7. onStart(): void;
  8. onSuccess(data: string): void;
  9. onError(code: number, message: string): void;
  10. onEnd(): void;
  11. }
  12. export { ReadyStateCallback, RequestCallback };