forked from erm0l0v/webpack-md5-hash
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dogmatico/ts-definition
Add Typescript definitions
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Type definitions for webpack-chunk-hash 0.4.0 | ||
// Project: https://github.com/alexindigo/webpack-chunk-hash | ||
// Definitions by: Cristian Lorenzo <https://github.com/dogmatico> | ||
|
||
import { Plugin } from "webpack"; | ||
|
||
declare class WebpackChunkHash extends Plugin { | ||
constructor(options?: WebpackChunkHash.WebpackChunkHashPluginOptions); | ||
} | ||
|
||
export = WebpackChunkHash; | ||
|
||
declare namespace WebpackChunkHash { | ||
interface WebpackChunkHashPluginOptions { | ||
/** | ||
* A callback to add more content to the resulting hash | ||
*/ | ||
additionalHashContent?: (chunk: any) => string; | ||
/** | ||
* Which algorithm to use. Defaults to 'md5'. | ||
* See https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm | ||
*/ | ||
algorithm?: string; | ||
/** | ||
* Which digest to use. Defaults to 'hex'. | ||
* See https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding | ||
*/ | ||
digest?: "hex" | "latin1" | "base64"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters