Class Hook<T, R, AdditionalOptions>
Constructors
constructor
- new Hook<T, R, AdditionalOptions>(args?: FixedSizeArray<AsArray<T>["length"], string>, name?: string): Hook<T, R, AdditionalOptions>
Type parameters
Parameters
Returns Hook<T, R, AdditionalOptions>
Properties
name
name: undefined | string
taps
Methods
callAsync
Parameters
Returns void
intercept
Parameters
Returns void
isUsed
Returns boolean
promise
- promise(...args: AsArray<T>): Promise<R>
Parameters
Returns Promise<R>
tap
- tap(options: string | (TapOptions & { name: string } & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void
Parameters
Returns void
withOptions
- withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<Hook<T, R, AdditionalOptions>, "promise" | "call" | "callAsync">
Parameters
Returns Omit<Hook<T, R, AdditionalOptions>, "promise" | "call" | "callAsync">