@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.
@@ -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
@@ -1,4 +1,5 @@
1
1
  export * from './types/FormData';
2
+ export * from './types/DelayedExecutorType';
2
3
  export * from './storage/IStorage';
3
4
  export * from './storage/WindowStorage';
4
5
  export * from './DataTypes';
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
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
@@ -1,4 +1,5 @@
1
1
  export * from './types/FormData';
2
+ export * from './types/DelayedExecutorType';
2
3
  export * from './storage/IStorage';
3
4
  export * from './storage/WindowStorage';
4
5
  export * from './DataTypes';
package/lib/mjs/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './types/FormData';
2
+ export * from './types/DelayedExecutorType';
2
3
  export * from './storage/IStorage';
3
4
  export * from './storage/WindowStorage';
4
5
  export * from './DataTypes';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/shared",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "TypeScript shared utilities and functions",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -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
@@ -1,4 +1,5 @@
1
1
  export * from './types/FormData';
2
+ export * from './types/DelayedExecutorType';
2
3
 
3
4
  export * from './storage/IStorage';
4
5
  export * from './storage/WindowStorage';
@@ -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
+ };