@etsoo/shared 1.1.12 → 1.1.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.
- package/lib/cjs/ExtendUtils.d.ts +2 -16
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/types/DelayedExecutorType.d.ts +16 -0
- package/lib/cjs/types/DelayedExecutorType.js +2 -0
- package/lib/mjs/ExtendUtils.d.ts +2 -16
- package/lib/mjs/index.d.ts +1 -0
- package/lib/mjs/index.js +1 -0
- package/lib/mjs/types/DelayedExecutorType.d.ts +16 -0
- package/lib/mjs/types/DelayedExecutorType.js +1 -0
- package/package.json +1 -1
- package/src/ExtendUtils.ts +3 -1
- package/src/index.ts +1 -0
- package/src/types/DelayedExecutorType.ts +18 -0
package/lib/cjs/ExtendUtils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DelayedExecutorType } from './types/DelayedExecutorType';
|
|
1
2
|
/**
|
|
2
3
|
* Extend utilities
|
|
3
4
|
*/
|
|
@@ -15,22 +16,7 @@ export declare namespace ExtendUtils {
|
|
|
15
16
|
* @param delayMiliseconds Delay miliseconds
|
|
16
17
|
* @returns Result
|
|
17
18
|
*/
|
|
18
|
-
function delayedExecutor<P extends any[]>(func: (...args: P) => void, delayMiliseconds: number):
|
|
19
|
-
/**
|
|
20
|
-
* Call the function
|
|
21
|
-
* @param args Args
|
|
22
|
-
*/
|
|
23
|
-
call(...args: P): void;
|
|
24
|
-
/**
|
|
25
|
-
* Clear
|
|
26
|
-
*/
|
|
27
|
-
clear(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Is running or not
|
|
30
|
-
* @returns Result
|
|
31
|
-
*/
|
|
32
|
-
isRunning(): boolean;
|
|
33
|
-
};
|
|
19
|
+
function delayedExecutor<P extends any[]>(func: (...args: P) => void, delayMiliseconds: number): DelayedExecutorType<P>;
|
|
34
20
|
/**
|
|
35
21
|
* Promise handler to catch error
|
|
36
22
|
* @param promise Promise
|
package/lib/cjs/index.d.ts
CHANGED
package/lib/cjs/index.js
CHANGED
|
@@ -11,6 +11,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./types/FormData"), exports);
|
|
14
|
+
__exportStar(require("./types/DelayedExecutorType"), exports);
|
|
14
15
|
__exportStar(require("./storage/IStorage"), exports);
|
|
15
16
|
__exportStar(require("./storage/WindowStorage"), exports);
|
|
16
17
|
__exportStar(require("./DataTypes"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare type DelayedExecutorType<P extends any[]> = {
|
|
2
|
+
/**
|
|
3
|
+
* Call the function
|
|
4
|
+
* @param args Args
|
|
5
|
+
*/
|
|
6
|
+
call(...args: P): void;
|
|
7
|
+
/**
|
|
8
|
+
* Clear
|
|
9
|
+
*/
|
|
10
|
+
clear(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Is running or not
|
|
13
|
+
* @returns Result
|
|
14
|
+
*/
|
|
15
|
+
isRunning(): boolean;
|
|
16
|
+
};
|
package/lib/mjs/ExtendUtils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DelayedExecutorType } from './types/DelayedExecutorType';
|
|
1
2
|
/**
|
|
2
3
|
* Extend utilities
|
|
3
4
|
*/
|
|
@@ -15,22 +16,7 @@ export declare namespace ExtendUtils {
|
|
|
15
16
|
* @param delayMiliseconds Delay miliseconds
|
|
16
17
|
* @returns Result
|
|
17
18
|
*/
|
|
18
|
-
function delayedExecutor<P extends any[]>(func: (...args: P) => void, delayMiliseconds: number):
|
|
19
|
-
/**
|
|
20
|
-
* Call the function
|
|
21
|
-
* @param args Args
|
|
22
|
-
*/
|
|
23
|
-
call(...args: P): void;
|
|
24
|
-
/**
|
|
25
|
-
* Clear
|
|
26
|
-
*/
|
|
27
|
-
clear(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Is running or not
|
|
30
|
-
* @returns Result
|
|
31
|
-
*/
|
|
32
|
-
isRunning(): boolean;
|
|
33
|
-
};
|
|
19
|
+
function delayedExecutor<P extends any[]>(func: (...args: P) => void, delayMiliseconds: number): DelayedExecutorType<P>;
|
|
34
20
|
/**
|
|
35
21
|
* Promise handler to catch error
|
|
36
22
|
* @param promise Promise
|
package/lib/mjs/index.d.ts
CHANGED
package/lib/mjs/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare type DelayedExecutorType<P extends any[]> = {
|
|
2
|
+
/**
|
|
3
|
+
* Call the function
|
|
4
|
+
* @param args Args
|
|
5
|
+
*/
|
|
6
|
+
call(...args: P): void;
|
|
7
|
+
/**
|
|
8
|
+
* Clear
|
|
9
|
+
*/
|
|
10
|
+
clear(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Is running or not
|
|
13
|
+
* @returns Result
|
|
14
|
+
*/
|
|
15
|
+
isRunning(): boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
package/src/ExtendUtils.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DelayedExecutorType } from './types/DelayedExecutorType';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Extend utilities
|
|
3
5
|
*/
|
|
@@ -28,7 +30,7 @@ export namespace ExtendUtils {
|
|
|
28
30
|
export function delayedExecutor<P extends any[]>(
|
|
29
31
|
func: (...args: P) => void,
|
|
30
32
|
delayMiliseconds: number
|
|
31
|
-
) {
|
|
33
|
+
): DelayedExecutorType<P> {
|
|
32
34
|
let seed: number = 0;
|
|
33
35
|
return {
|
|
34
36
|
/**
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type DelayedExecutorType<P extends any[]> = {
|
|
2
|
+
/**
|
|
3
|
+
* Call the function
|
|
4
|
+
* @param args Args
|
|
5
|
+
*/
|
|
6
|
+
call(...args: P): void;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Clear
|
|
10
|
+
*/
|
|
11
|
+
clear(): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Is running or not
|
|
15
|
+
* @returns Result
|
|
16
|
+
*/
|
|
17
|
+
isRunning(): boolean;
|
|
18
|
+
};
|