Skip to content

Commit

Permalink
Make options Partial<Options> (#141)
Browse files Browse the repository at this point in the history
* Make options Partial<Options>

When working with webpack.config.ts ts complains when you try to pass a partial object literal.
This fixes that.

* Fixed the build.

Had not ran a full build and test before.
Had just quickly done an edit to make the webpack file to stop complaining, was hoping it would pass the auto build.

* Ready release
  • Loading branch information
Larry1123 authored and johnnyreilly committed Aug 8, 2018
1 parent 45dc15a commit cd7d8c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.4.6

* [Fix(types): Make options Partial<Options> ](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/141) (#140)

## v0.4.5

* [Fix(types): Add types to the plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin/pull/139) (#137)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fork-ts-checker-webpack-plugin",
"version": "0.4.5",
"version": "0.4.6",
"description": "Runs typescript type checker and linter on separate process.",
"main": "lib/index.js",
"types": "lib/types/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ForkTsCheckerWebpackPlugin {
static ONE_CPU_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 1);
static TWO_CPUS_FREE = Math.max(1, ForkTsCheckerWebpackPlugin.ALL_CPUS - 2);

options: Options;
options: Partial<Options>;
tsconfig: string;
tslint: string | true;
watch: string[];
Expand Down Expand Up @@ -104,7 +104,7 @@ class ForkTsCheckerWebpackPlugin {

vue: boolean;

constructor(options: Options) {
constructor(options?: Partial<Options>) {
options = options || {} as Options;
this.options = Object.assign({}, options);

Expand Down

0 comments on commit cd7d8c6

Please sign in to comment.