mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[webpack]: Fixed type of beforeRun hook. (#32208)
* [webpack]: Fixed type of beforeRun hook. Previously this took a `Compilation` parameter, but actually takes a `Compiler`. See https://github.com/webpack/webpack/blob/ccc7db79bab25ed3ef49435abc8866b63721b8b6/lib/Compiler.js#L50-L51 * Changed run hook from taking `Compilation` parameter to taking `Compiler` parameter.
This commit is contained in:
committed by
John Reilly
parent
5f012ded23
commit
abb32ebad4
Vendored
+2
-2
@@ -988,8 +988,8 @@ declare namespace webpack {
|
||||
shouldEmit: SyncBailHook<Compilation>;
|
||||
done: AsyncSeriesHook<Stats>;
|
||||
additionalPass: AsyncSeriesHook;
|
||||
beforeRun: AsyncSeriesHook<Compilation>;
|
||||
run: AsyncSeriesHook<Compilation>;
|
||||
beforeRun: AsyncSeriesHook<Compiler>;
|
||||
run: AsyncSeriesHook<Compiler>;
|
||||
emit: AsyncSeriesHook<Compilation>;
|
||||
afterEmit: AsyncSeriesHook<Compilation>;
|
||||
thisCompilation: SyncHook<Compilation, { normalModuleFactory: NormalModuleFactory }>;
|
||||
|
||||
@@ -284,6 +284,9 @@ configuration = {
|
||||
callback
|
||||
);
|
||||
});
|
||||
|
||||
this.hooks.beforeRun.tap("SomePlugin", (compiler: webpack.Compiler) => {});
|
||||
this.hooks.run.tap("SomePlugin", (compiler: webpack.Compiler) => {});
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user