@types/tapable
Advanced tools
Comparing version 0.2.4 to 1.0.0
@@ -1,7 +0,8 @@ | ||
// Type definitions for tapable v0.2.5 | ||
// Type definitions for tapable v1.0.0 | ||
// Project: https://github.com/webpack/tapable.git | ||
// Definitions by: e-cloud <https://github.com/e-cloud> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
declare abstract class Tapable { | ||
export declare abstract class Tapable { | ||
private _plugins: { | ||
@@ -12,2 +13,3 @@ [propName: string]: Tapable.Handler[] | ||
/** | ||
* @deprecated Tapable.plugin is deprecated. Use new API on `.hooks` instead | ||
* Register plugin(s) | ||
@@ -22,5 +24,7 @@ * This acts as the same as on() of EventEmitter, for registering a handler/listener to do something when the | ||
/** @deprecated Tapable.plugin is deprecated. Use new API on `.hooks` instead */ | ||
plugin(names: string[], handler: (this: this, ...args: any[]) => void): void; | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* invoke all plugins with this attached. | ||
@@ -33,2 +37,3 @@ * This method is just to "apply" plugins' definition, so that the real event listeners can be registered into | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* synchronously applies all registered handlers for target name(event id). | ||
@@ -50,2 +55,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* synchronously applies all registered handlers for target name(event id). | ||
@@ -62,2 +68,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* synchronously applies all registered handlers for target name(event id). | ||
@@ -74,2 +81,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* synchronously applies all registered handlers for target name(event id). | ||
@@ -84,2 +92,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* synchronously applies all registered handlers for target name(event id). | ||
@@ -98,2 +107,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* asynchronously applies all registered handlers for target name(event id). | ||
@@ -112,2 +122,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* same as `applyPluginsAsync` | ||
@@ -124,2 +135,3 @@ * @see applyPluginsAsync | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* asynchronously applies all registered handlers for target name(event id). | ||
@@ -140,2 +152,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* asynchronously applies all registered handlers for target name(event id). | ||
@@ -153,2 +166,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* Asynchronously applies all registered handlers for target name(event id). | ||
@@ -170,2 +184,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* applies all registered handlers for target name(event id) in parallel. | ||
@@ -184,2 +199,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* applies all registered handlers for target name(event id) in parallel. | ||
@@ -199,2 +215,3 @@ * | ||
/** | ||
* @deprecated Tapable.apply is deprecated. Call apply on the plugin directly instead | ||
* applies all registered handlers for target name(event id) in parallel. | ||
@@ -228,2 +245,61 @@ * | ||
export = Tapable | ||
type TapType = "sync" | "async" | "promise"; | ||
export interface HookCompileOptions { | ||
type: TapType; | ||
} | ||
export interface Tap { | ||
name: string; | ||
type: TapType; | ||
fn: Function; | ||
stage: number; | ||
context: boolean; | ||
} | ||
export class Hook<T1 = any, T2 = any, T3 = any> { | ||
constructor(...args: any[]); | ||
taps: any[]; | ||
interceptors: any[]; | ||
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; | ||
compile(options: HookCompileOptions) : Function; | ||
tap: (name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => any) => void; | ||
tapAsync: (name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => void) => void; | ||
tapPromise: (name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => Promise<any>) => void; | ||
intercept: (interceptor: HookInterceptor) => void; | ||
} | ||
export class SyncHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class SyncBailHook <T1 = any, T2 = any, T3 = any>extends Hook<T1, T2, T3> {} | ||
export class SyncLoopHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class SyncWaterfallHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class AsyncParallelHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class AsyncParallelBailHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class AsyncSeriesHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
export class AsyncSeriesBailHook<T1 = any, T2 = any, T3 = any> extends Hook<T1, T2, T3> {} | ||
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; | ||
} | ||
export class HookMap<T1 = any, T2 = any, T3 = any> { | ||
get: (key: any) => Hook<T1, T2, T3> | undefined; | ||
for: (key: any) => Hook<T1, T2, T3>; | ||
tap: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => any) => void; | ||
tapAsync: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => void) => void; | ||
tapPromise: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => Promise<any>) => void; | ||
intercept: (interceptor: HookMapInterceptor<T1, T2, T3>) => void; | ||
} | ||
export class HookMapInterceptor<T1 = any, T2 = any, T3 = any> { | ||
factory: (key: any, hook: Hook<T1, T2, T3>) => Hook<T1, T2, T3>; | ||
} |
{ | ||
"name": "@types/tapable", | ||
"version": "0.2.4", | ||
"version": "1.0.0", | ||
"description": "TypeScript definitions for tapable", | ||
@@ -9,3 +9,4 @@ "license": "MIT", | ||
"name": "e-cloud", | ||
"url": "https://github.com/e-cloud" | ||
"url": "https://github.com/e-cloud", | ||
"githubUsername": "e-cloud" | ||
} | ||
@@ -20,4 +21,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "79ac4245792f91afc5f8a7db9d4766970a979236f8d61d3973e1172e7bb55754", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "a47b995915b5cd45fcb18fdde87a7db871631a8eea0129138f15419c35dad08e", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 21 Aug 2017 22:03:22 GMT | ||
* Last updated: Sat, 10 Mar 2018 02:17:46 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14729
254
0