mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 00:18:20 +08:00
update: add private member info and rename an interface (#12563)
This commit is contained in:
committed by
Masahiro Wakame
parent
19e5c2a094
commit
0298c01966
10
tapable/index.d.ts
vendored
10
tapable/index.d.ts
vendored
@@ -4,6 +4,10 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare abstract class Tapable {
|
||||
private _plugins: {
|
||||
[index: string]: Tapable.Handler[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Register plugin(s)
|
||||
* This acts as the same as on() of EventEmitter, for registering a handler/listener to do something when the
|
||||
@@ -12,9 +16,9 @@ declare abstract class Tapable {
|
||||
* @param names a string or an array of strings to generate the id(group name) of plugins
|
||||
* @param handler a function which provides the plugin functionality *
|
||||
*/
|
||||
plugin(names: string, handler: Tapable.Listener): void;
|
||||
plugin(names: string, handler: Tapable.Handler): void;
|
||||
|
||||
plugin(names: string[], handler: Tapable.Listener): void;
|
||||
plugin(names: string[], handler: Tapable.Handler): void;
|
||||
|
||||
/**
|
||||
* invoke all plugins with this attached.
|
||||
@@ -185,7 +189,7 @@ declare abstract class Tapable {
|
||||
}
|
||||
|
||||
declare namespace Tapable {
|
||||
interface Listener {
|
||||
interface Handler {
|
||||
(...args: any[]): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user