File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ interface Logger {
3838}
3939
4040interface Options {
41+ typescript ?: string ;
4142 tsconfig : string ;
4243 tslint : string | true ;
4344 watch : string | string [ ] ;
@@ -110,7 +111,7 @@ class ForkTsCheckerWebpackPlugin {
110111
111112 vue : boolean ;
112113
113- constructor ( typescriptPath ?: string | null , options ?: Partial < Options > ) {
114+ constructor ( options ?: Partial < Options > ) {
114115 options = options || ( { } as Options ) ;
115116 this . options = Object . assign ( { } , options ) ;
116117
@@ -161,8 +162,8 @@ class ForkTsCheckerWebpackPlugin {
161162 this . doneCallback = this . createDoneCallback ( ) ;
162163
163164 // tslint:disable-next-line:no-implicit-dependencies
164- this . typescriptPath = typescriptPath || require . resolve ( 'typescript' ) ;
165- this . typescriptVersion = require ( typescriptPath ) . version ;
165+ this . typescriptPath = options . typescript || require . resolve ( 'typescript' ) ;
166+ this . typescriptVersion = require ( this . typescriptPath ) . version ;
166167 this . tslintVersion = this . tslint
167168 ? // tslint:disable-next-line:no-implicit-dependencies
168169 require ( 'tslint' ) . Linter . VERSION
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ describe('[INTEGRATION] vue', function() {
7575 } ;
7676
7777 checker = new IncrementalChecker (
78+ require . resolve ( 'typescript' ) ,
7879 plugin . tsconfigPath ,
7980 plugin . tslintPath || false ,
8081 [ compiler . context ] ,
You can’t perform that action at this time.
0 commit comments