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