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 @@ -39,6 +39,7 @@ interface Logger {
3939}
4040
4141interface Options {
42+ typescript ?: string ;
4243 tsconfig : string ;
4344 compilerOptions : object ;
4445 tslint : string | true ;
@@ -115,7 +116,7 @@ class ForkTsCheckerWebpackPlugin {
115116
116117 vue : boolean ;
117118
118- constructor ( typescriptPath ?: string | null , options ?: Partial < Options > ) {
119+ constructor ( options ?: Partial < Options > ) {
119120 options = options || ( { } as Options ) ;
120121 this . options = Object . assign ( { } , options ) ;
121122
@@ -171,8 +172,8 @@ class ForkTsCheckerWebpackPlugin {
171172 this . doneCallback = this . createDoneCallback ( ) ;
172173
173174 // tslint:disable-next-line:no-implicit-dependencies
174- this . typescriptPath = typescriptPath || require . resolve ( 'typescript' ) ;
175- this . typescriptVersion = require ( typescriptPath ) . version ;
175+ this . typescriptPath = options . typescript || require . resolve ( 'typescript' ) ;
176+ this . typescriptVersion = require ( this . typescriptPath ) . version ;
176177 this . tslintVersion = this . tslint
177178 ? // tslint:disable-next-line:no-implicit-dependencies
178179 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 { } ,
8081 plugin . tslintPath || false ,
You can’t perform that action at this time.
0 commit comments