devix 0.0.20 → 0.0.22

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.
package/dist/index.d.ts CHANGED
@@ -1,27 +1,52 @@
1
+ //! format types
1
2
  interface ITimerObj {
2
- year: string;
3
- month: string;
4
- day: string;
5
- hours: string;
6
- minutes: string;
7
- seconds: string;
8
- week: string;
9
- weekNum: string;
3
+ year: string
4
+ month: string
5
+ day: string
6
+ hours: string
7
+ minutes: string
8
+ seconds: string
9
+ week: string
10
+ weekNum: string
10
11
  }
11
- type TFormatTimer = (cellValue: string | number | Date, formatType?: string) => string | ITimerObj;
12
+
13
+ type TFormatTimer = (
14
+ cellValue: string | number | Date,
15
+ formatType?: string
16
+ ) => string | ITimerObj
17
+
18
+ //! retalimit types
12
19
  type ThrottleOptions = {
13
- leading?: boolean;
14
- trailing?: boolean;
15
- };
16
- type Tcase = 'upper' | 'lower';
17
- type TCases = [Tcase, Tcase];
20
+ leading?: boolean
21
+ trailing?: boolean
22
+ }
23
+
24
+ interface TestServerOption {
25
+ url: string
26
+ method: string
27
+ handler: (ctx: any, next: any) => any
28
+ }
29
+
30
+ interface ITestServerOptions {
31
+ routes?: Array<TestServerOption>
32
+ }
33
+ type TIsType = (type: string, target: any) => boolean
34
+
35
+ //! other types
36
+ type Tcase = 'upper' | 'lower'
37
+ type TCases = [Tcase, Tcase]
38
+ type TTransGetParams = (params: IDataObject) => string
39
+ interface IDataObject {
40
+ [key: string]: any
41
+ }
18
42
 
19
43
  declare function currying(fn: Function): (this: any, ...args: any[]) => any;
20
44
  declare function compose(...fns: Function[]): ((this: any, ...args: any[]) => any) | undefined;
21
45
  declare function insertStr(soure: string, start: number, newStr: string): string;
22
46
  declare function stringCase(soure: string, separa?: string[], cases?: TCases): string;
47
+ declare const transformGetParams: TTransGetParams;
23
48
 
24
- declare const isType: (type: string, target: any) => boolean;
49
+ declare const isType: TIsType;
25
50
 
26
51
  declare enum CacheType {
27
52
  Local = 0,
@@ -66,4 +91,6 @@ declare function setTimer(execute: (...args: any[]) => any, delay?: number, imme
66
91
  cancel: () => void;
67
92
  }>;
68
93
 
69
- export { SortType, bubblingSort, compose, currying, debounce, deepClone, formatTimer, insertStr, isType, localCache, sessionCache, setTimer, shallowClone, stringCase, throttle };
94
+ declare const createTestServer: (options?: ITestServerOptions) => any;
95
+
96
+ export { SortType, bubblingSort, compose, createTestServer, currying, debounce, deepClone, formatTimer, insertStr, isType, localCache, sessionCache, setTimer, shallowClone, stringCase, throttle, transformGetParams };