update: add private member info and rename an interface (#12563)

This commit is contained in:
Scott(JuJiang)
2016-11-10 20:21:40 +08:00
committed by Masahiro Wakame
parent 19e5c2a094
commit 0298c01966

10
tapable/index.d.ts vendored
View File

@@ -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;
}