From 0298c01966cd32884ebefad2cfb5fc347470cb78 Mon Sep 17 00:00:00 2001 From: "Scott(JuJiang)" Date: Thu, 10 Nov 2016 20:21:40 +0800 Subject: [PATCH] update: add private member info and rename an interface (#12563) --- tapable/index.d.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tapable/index.d.ts b/tapable/index.d.ts index 4588643c6d..68ea3e4104 100644 --- a/tapable/index.d.ts +++ b/tapable/index.d.ts @@ -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; }