mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Make tapable HookInterceptor fields optional
Remove the `name` field, which is unused.
This commit is contained in:
13
types/tapable/index.d.ts
vendored
13
types/tapable/index.d.ts
vendored
@@ -247,7 +247,7 @@ export interface Tap {
|
||||
export class Hook<T1 = any, T2 = any, T3 = any> {
|
||||
constructor(...args: any[]);
|
||||
taps: any[];
|
||||
interceptors: any[];
|
||||
interceptors: HookInterceptor[];
|
||||
call: (arg1?: T1, arg2?: T2, arg3?: T3, ...args: any[]) => any;
|
||||
promise:(arg1?: T1, arg2?: T2, arg3?: T3, ...args: any[]) => Promise<any>;
|
||||
callAsync: (arg1?: T1, arg2?: T2, arg3?: T3, ...args: any[]) => any;
|
||||
@@ -271,12 +271,11 @@ export class AsyncSeriesBailHook<T1 = any, T2 = any, T3 = any> extends Hook<T1,
|
||||
export class AsyncSeriesWaterfallHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {}
|
||||
|
||||
export class HookInterceptor {
|
||||
call: (...args: any[]) => void;
|
||||
loop: (...args: any[]) => void;
|
||||
tap: (tap: Tap) => void;
|
||||
register: (tap: Tap) => Tap | undefined;
|
||||
context: boolean;
|
||||
name: string;
|
||||
call?: (...args: any[]) => void;
|
||||
loop?: (...args: any[]) => void;
|
||||
tap?: (tap: Tap) => void;
|
||||
register?: (tap: Tap) => Tap | undefined;
|
||||
context?: boolean;
|
||||
}
|
||||
|
||||
/** A HookMap is a helper class for a Map with Hooks */
|
||||
|
||||
Reference in New Issue
Block a user