From 2ca09c9734e9738a8adefb40d2bbc3a342f8e80e Mon Sep 17 00:00:00 2001 From: Jonathan Creamer Date: Wed, 9 Aug 2017 09:50:18 -0500 Subject: [PATCH] Add tests, run lint --- types/webpack/index.d.ts | 7 ++++--- types/webpack/webpack-tests.ts | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index 07fa5644b1..afbbbf3928 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -5,6 +5,7 @@ // Boris Cherny // Tommy Troy Lin // Mohsen Azimi +// Jonathan Creamer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -834,9 +835,9 @@ declare namespace webpack { class HashedModuleIdsPlugin extends Plugin { constructor(options?: { - hashFunction: string, - hashDigest: string, - hashDigestLength: number + hashFunction?: string, + hashDigest?: string, + hashDigestLength?: number }); } diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 6c7095483d..7db91f59d9 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -424,6 +424,12 @@ plugin = new webpack.LoaderOptionsPlugin({ plugin = new webpack.EnvironmentPlugin(['a', 'b']); plugin = new webpack.EnvironmentPlugin({a: true, b: 'c'}); plugin = new webpack.ProgressPlugin((percent: number, message: string) => {}); +plugin = new webpack.HashedModuleIdsPlugin(); +plugin = new webpack.HashedModuleIdsPlugin({ + hashFunction: 'sha256', + hashDigest: 'hex', + hashDigestLength: 20 +}); // // http://webpack.github.io/docs/node.js-api.html