import { IRawProperty } from './IRawProperty'; import { GlobalAsyncPropertyHookFunction } from '../runner/configuration/GlobalParameters'; /** * Type of legal hook function that can be used to call `beforeEach` or `afterEach` * on a {@link IAsyncPropertyWithHooks} * * @public */ export declare type AsyncPropertyHookFunction = ((previousHookFunction: GlobalAsyncPropertyHookFunction) => Promise) | ((previousHookFunction: GlobalAsyncPropertyHookFunction) => void); /** * Interface for asynchronous property, see {@link IRawProperty} * @public */ export interface IAsyncProperty extends IRawProperty { } /** * Interface for asynchronous property defining hooks, see {@link IAsyncProperty} * @public */ export interface IAsyncPropertyWithHooks extends IAsyncProperty { /** * Define a function that should be called before all calls to the predicate * @param hookFunction - Function to be called */ beforeEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks; /** * Define a function that should be called after all calls to the predicate * @param hookFunction - Function to be called */ afterEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks; }