@arkstack/foundry 0.12.5 → 0.12.7
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 +41 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,13 +11,54 @@ type HookArgs<N extends string, P extends string> = N extends keyof HookRegistry
|
|
|
11
11
|
//#region src/Hook.d.ts
|
|
12
12
|
declare class Hook {
|
|
13
13
|
private static hooks;
|
|
14
|
+
/**
|
|
15
|
+
* Hooks define code that should run within defined boundaries to add extra functionalities.
|
|
16
|
+
*
|
|
17
|
+
* @param name
|
|
18
|
+
* @param value
|
|
19
|
+
*/
|
|
14
20
|
static set<N extends HookName>(name: N | (string & {}), hook: HookFor<N>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a hook is defined by name
|
|
23
|
+
*
|
|
24
|
+
* @param name
|
|
25
|
+
*/
|
|
15
26
|
static has<N extends HookName, P extends HookPositions<N>>(name: N | (string & {}), pos?: P): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a defined hook by name
|
|
29
|
+
*
|
|
30
|
+
* @param name
|
|
31
|
+
*/
|
|
16
32
|
static get<N extends HookName>(name: N): HookFor<N> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve a defined hook by name and position
|
|
35
|
+
*
|
|
36
|
+
* @param name
|
|
37
|
+
* @param pos
|
|
38
|
+
*/
|
|
17
39
|
static get<N extends HookName, P extends HookPositions<N>>(name: N, pos: P): HookPos<N, P> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieve a defined hook by name and position the set args for callback
|
|
42
|
+
*
|
|
43
|
+
* @param name
|
|
44
|
+
* @param pos
|
|
45
|
+
*/
|
|
18
46
|
static get<N extends HookName, P extends HookPositions<N>>(name: N, pos: P, ...args: HookArgs<N, P>): void;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieve all defined hooks
|
|
49
|
+
*
|
|
50
|
+
* @param name
|
|
51
|
+
*/
|
|
19
52
|
static getAll: () => Record<string, IHook> & HookRegistry;
|
|
53
|
+
/**
|
|
54
|
+
* Remove the defined hook
|
|
55
|
+
*
|
|
56
|
+
* @param name
|
|
57
|
+
*/
|
|
20
58
|
static unset<N extends HookName, P extends HookPositions<N>>(name?: N | (string & {}), pos?: P): undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Clear all the defined hooks
|
|
61
|
+
*/
|
|
21
62
|
static clear: () => void;
|
|
22
63
|
}
|
|
23
64
|
//#endregion
|
package/package.json
CHANGED