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