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 {
39
39
}
40
40
41
41
interface Options {
42
+ typescript ?: string ;
42
43
tsconfig : string ;
43
44
compilerOptions : object ;
44
45
tslint : string | true ;
@@ -115,7 +116,7 @@ class ForkTsCheckerWebpackPlugin {
115
116
116
117
vue : boolean ;
117
118
118
- constructor ( typescriptPath ?: string | null , options ?: Partial < Options > ) {
119
+ constructor ( options ?: Partial < Options > ) {
119
120
options = options || ( { } as Options ) ;
120
121
this . options = Object . assign ( { } , options ) ;
121
122
@@ -171,8 +172,8 @@ class ForkTsCheckerWebpackPlugin {
171
172
this . doneCallback = this . createDoneCallback ( ) ;
172
173
173
174
// 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 ;
176
177
this . tslintVersion = this . tslint
177
178
? // tslint:disable-next-line:no-implicit-dependencies
178
179
require ( 'tslint' ) . Linter . VERSION
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ describe('[INTEGRATION] vue', function() {
75
75
} ;
76
76
77
77
checker = new IncrementalChecker (
78
+ require . resolve ( 'typescript' ) ,
78
79
plugin . tsconfigPath ,
79
80
{ } ,
80
81
plugin . tslintPath || false ,
You can’t perform that action at this time.
0 commit comments