mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +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 ccc7db79ba/lib/Compiler.js (L50-L51)
* Changed run hook from taking `Compilation` parameter to taking `Compiler` parameter.
This commit is contained in:
parent
5f012ded23
commit
abb32ebad4
4
types/webpack/index.d.ts
vendored
4
types/webpack/index.d.ts
vendored
@ -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) => {});
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user