From a8ca210006b03858280166f7a11e56182a1c9523 Mon Sep 17 00:00:00 2001 From: Masuzu Date: Sun, 26 May 2019 15:57:31 +0100 Subject: [PATCH] Fix Typescript validation issues with --strictNullCheck Example of errors this change addresses: ``` ERROR in [at-loader] ./node_modules/webpack-obfuscator/index.ts:48:32 TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. ``` --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 7f92b7c..cf5cdc5 100644 --- a/index.ts +++ b/index.ts @@ -36,7 +36,7 @@ class WebpackObfuscator { public apply (compiler: Compiler): void { compiler.plugin('compilation', (compilation: any) => { compilation.plugin("optimize-chunk-assets", (chunks: any[], callback: () => void) => { - let files = []; + let files: any[] = []; chunks.forEach((chunk) => { chunk['files'].forEach((file) => {