From ad6ef1cd46e2011b0e17415d7857dabbe1424f64 Mon Sep 17 00:00:00 2001 From: Tommy Troy Lin Date: Tue, 14 Feb 2017 15:54:42 +0800 Subject: [PATCH] Update to comply with @bumbleblym' s suggestions --- webpack/index.d.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/webpack/index.d.ts b/webpack/index.d.ts index 696968719c..9b80258479 100644 --- a/webpack/index.d.ts +++ b/webpack/index.d.ts @@ -654,14 +654,20 @@ declare namespace webpack { */ class BannerPlugin extends Plugin { - constructor(options: { - banner: string, - raw?: boolean, - entryOnly?: boolean, - test?: string | RegExp | Array, - include?: string | RegExp | Array, - exclude?: string | RegExp | Array - }); + constructor(options?: BannerPlugin.Options | string); + } + + namespace BannerPlugin { + type Filter = string | RegExp; + + interface Options { + banner?: string; + entryOnly?: boolean; + exclude?: Filter | Filter[]; + include?: Filter | Filter[]; + raw?: boolean; + test?: Filter | Filter[]; + } } class ContextReplacementPlugin extends Plugin {