1 | import type { IRawProperty } from './IRawProperty.js';
|
2 | import type { GlobalAsyncPropertyHookFunction } from '../runner/configuration/GlobalParameters.js';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export type AsyncPropertyHookFunction = ((previousHookFunction: GlobalAsyncPropertyHookFunction) => Promise<unknown>) | ((previousHookFunction: GlobalAsyncPropertyHookFunction) => void);
|
11 | /**
|
12 | * Interface for asynchronous property, see {@link IRawProperty}
|
13 | * @remarks Since 1.19.0
|
14 | * @public
|
15 | */
|
16 | export interface IAsyncProperty<Ts> extends IRawProperty<Ts, true> {
|
17 | }
|
18 | /**
|
19 | * Interface for asynchronous property defining hooks, see {@link IAsyncProperty}
|
20 | * @remarks Since 2.2.0
|
21 | * @public
|
22 | */
|
23 | export interface IAsyncPropertyWithHooks<Ts> extends IAsyncProperty<Ts> {
|
24 | /**
|
25 | * Define a function that should be called before all calls to the predicate
|
26 | * @param hookFunction - Function to be called
|
27 | * @remarks Since 1.6.0
|
28 | */
|
29 | beforeEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
|
30 | /**
|
31 | * Define a function that should be called after all calls to the predicate
|
32 | * @param hookFunction - Function to be called
|
33 | * @remarks Since 1.6.0
|
34 | */
|
35 | afterEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
|
36 | }
|
37 |
|
\ | No newline at end of file |