utils.d.ts 785 B

12345678910111213141516171819
  1. import { QueryOption, UpdateOption } from '../query';
  2. export declare const sleep: (ms?: number) => Promise<unknown>;
  3. export declare const autoCount: (domain?: string) => number;
  4. export declare const getReqOpts: (apiOptions: QueryOption | UpdateOption) => any;
  5. export declare const filterUndefined: (o: any) => any;
  6. export declare const stringifyByEJSON: (params: any) => any;
  7. export declare const parseByEJSON: (params: any) => any;
  8. export declare class TcbError extends Error {
  9. readonly code: string;
  10. readonly message: string;
  11. constructor(error: IErrorInfo);
  12. }
  13. export declare const E: (errObj: IErrorInfo) => TcbError;
  14. export declare function processReturn(throwOnCode: boolean, res: any): any;
  15. interface IErrorInfo {
  16. code?: string;
  17. message?: string;
  18. }
  19. export {};