1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export declare class HookContext {
|
8 | |
9 |
|
10 |
|
11 | constructor(init?: HookContextInit);
|
12 |
|
13 | /**
|
14 | * The recommended place to store and share data between hooks in the same scope (app-level vs invocation-level).
|
15 | * You should use a unique property name so that it doesn't conflict with other hooks' data.
|
16 | * This object is readonly. You may modify it, but attempting to overwrite it will throw an error
|
17 | */
|
18 | readonly hookData: Record<string, unknown>;
|
19 | }
|
20 |
|
21 | /**
|
22 | * Base interface for objects passed to HookContext constructors.
|
23 | * For testing purposes only.
|
24 | */
|
25 | export interface HookContextInit {
|
26 | hookData?: Record<string, unknown>;
|
27 | }
|