utils-lib-js 1.7.10 → 1.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ export declare const getInstance: IGetInstance;
12
12
  export declare const classDecorator: IClassDecorator;
13
13
  export declare const stringToJson: IStringToJson;
14
14
  export declare const jsonToString: IJsonToString;
15
+ export declare const isWindow: (win: any) => boolean;
15
16
  declare const _default: {
16
17
  getValue: IGetValue;
17
18
  setValue: ISetValue;
@@ -26,5 +27,6 @@ declare const _default: {
26
27
  classDecorator: IClassDecorator;
27
28
  stringToJson: IStringToJson;
28
29
  jsonToString: IJsonToString;
30
+ isWindow: (win: any) => boolean;
29
31
  };
30
32
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { IRequest, IRequestBase, IRequestInit, IInterceptors, IUrl, IObject, IRequestBody, IRequestOptions, IRequestBaseFn, IEnv } from "./index";
2
- import CustomAbortController from "abort-controller";
3
2
  declare class Interceptors implements IInterceptors {
4
3
  private requestSuccess;
5
4
  private responseSuccess;
@@ -36,7 +35,7 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
36
35
  headers?: {};
37
36
  body?: any;
38
37
  timeout?: number;
39
- controller?: CustomAbortController;
38
+ controller?: any;
40
39
  type?: string;
41
40
  }) => IRequestOptions;
42
41
  initFetchParams: (url: IUrl, opts: IRequestOptions) => any;
@@ -31,7 +31,7 @@ export type IStringToJson = (target: string) => IObject<any> | null;
31
31
  export type IJsonToString = (target: IObject<any>) => string;
32
32
  export type IThrottle = (fn: Function, time: number) => (...args: any[]) => void;
33
33
  export type IDebounce = (fn: Function, time: number) => (...args: any[]) => void;
34
- export type IDefer = () => IPromise;
34
+ export type IDefer = (timer?: number) => IPromise;
35
35
  export type ICatchAwait<T extends Promise<any>> = (defer: T) => T;
36
36
  export type IArrayRandom<T extends any[]> = (arr: T) => T;
37
37
  export type IArrayUniq<T extends any[]> = (arr: T) => T;
@@ -54,5 +54,6 @@ declare const _default: {
54
54
  classDecorator: import("./types").IClassDecorator;
55
55
  stringToJson: import("./types").IStringToJson;
56
56
  jsonToString: import("./types").IJsonToString;
57
+ isWindow: (win: any) => boolean;
57
58
  };
58
59
  export default _default;