feat: upgrade to tapbale v0.2.5

This commit is contained in:
e-cloud
2016-12-09 09:23:42 +08:00
parent af4ddd7fb9
commit 666bff5013
2 changed files with 14 additions and 2 deletions
+10 -2
View File
@@ -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).
*
+4
View File
@@ -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);