Skip to content

Commit aa36f83

Browse files
reducktedSimenB
authored andcommitted
Updated typings (#85)
* Added files property to options typings. * The constructor can take an array of options. * Added changes to the changelog.
1 parent ce2f8f5 commit aa36f83

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
Latest version of this document will always be available on https://github.com/SimenB/add-asset-html-webpack-plugin/releases
66

77
## [Unreleased]
8-
Nothing
8+
- Fix TypeScript definition file
9+
- Allows an array of options in the plugin constructor
10+
- Added `files` property to options
911

1012
## [2.1.1] - 2017-08-16
1113
### Fixes

index.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ declare namespace AddAssetHtmlPlugin {
66
*/
77
filepath: string;
88

9+
/**
10+
* Files that the assets will be added to.
11+
* By default the assets will be included in all files. If files are defined, the
12+
* assets will only be included in specified file globs.
13+
*/
14+
files?: string | string[];
15+
916
/**
1017
* If true, will append a unique hash of the file to the filename. This is useful for cache busting.
1118
* Default false.
@@ -37,7 +44,7 @@ declare namespace AddAssetHtmlPlugin {
3744
}
3845

3946
declare class AddAssetHtmlPlugin {
40-
constructor(options: AddAssetHtmlPlugin.Options);
47+
constructor(options: AddAssetHtmlPlugin.Options | AddAssetHtmlPlugin.Options[]);
4148
apply(compiler: any): void;
4249
}
4350

0 commit comments

Comments
 (0)