mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
feat: upgrade to tapbale v0.2.5
This commit is contained in:
Vendored
+10
-2
@@ -1,11 +1,11 @@
|
||||
// Type definitions for tapable v0.2.4
|
||||
// Type definitions for tapable v0.2.5
|
||||
// Project: http://github.com/webpack/tapable.git
|
||||
// Definitions by: e-cloud <https://github.com/e-cloud>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare abstract class Tapable {
|
||||
private _plugins: {
|
||||
[index: string]: Tapable.Handler[]
|
||||
[propName: string]: Tapable.Handler[]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,6 +37,12 @@ declare abstract class Tapable {
|
||||
*/
|
||||
applyPlugins(name: string, ...args: any[]): void;
|
||||
|
||||
applyPlugins0(name: string): void;
|
||||
|
||||
applyPlugins1(name: string, param: any): void;
|
||||
|
||||
applyPlugins2(name: string, param1: any, param2: any): void;
|
||||
|
||||
/**
|
||||
* synchronously applies all registered handlers for target name(event id).
|
||||
*
|
||||
@@ -103,6 +109,8 @@ declare abstract class Tapable {
|
||||
*/
|
||||
applyPluginsAsyncSeries(name: string, ...args: any[]): void;
|
||||
|
||||
applyPluginsAsyncSeries1(name: string, param: any, callback: Tapable.CallbackFunction): void
|
||||
|
||||
/**
|
||||
* asynchronously applies all registered handlers for target name(event id).
|
||||
*
|
||||
|
||||
@@ -29,12 +29,16 @@ let callback: Tapable.CallbackFunction = function () {
|
||||
compiler.apply(new DllPlugin());
|
||||
|
||||
compiler.applyPlugins('doSomething', 'a', 'b');
|
||||
compiler.applyPlugins0('doSomething');
|
||||
compiler.applyPlugins1('doSomething', 'a');
|
||||
compiler.applyPlugins2('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsWaterfall('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsWaterfall0('doSomething', 'a');
|
||||
compiler.applyPluginsBailResult('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsBailResult1('doSomething', ['a', 'b']);
|
||||
compiler.applyPluginsAsync('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsAsyncSeries('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsAsyncSeries1('doSomething', 'a', callback);
|
||||
compiler.applyPluginsAsyncSeriesBailResult('doSomething', 'a', 'b');
|
||||
compiler.applyPluginsAsyncSeriesBailResult1('doSomething', 'a', callback);
|
||||
compiler.applyPluginsAsyncWaterfall('doSomething', 'a', callback);
|
||||
|
||||
Reference in New Issue
Block a user