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 {
38
38
}
39
39
40
40
interface Options {
41
+ typescript ?: string ;
41
42
tsconfig : string ;
42
43
tslint : string | true ;
43
44
watch : string | string [ ] ;
@@ -110,7 +111,7 @@ class ForkTsCheckerWebpackPlugin {
110
111
111
112
vue : boolean ;
112
113
113
- constructor ( typescriptPath ?: string | null , options ?: Partial < Options > ) {
114
+ constructor ( options ?: Partial < Options > ) {
114
115
options = options || ( { } as Options ) ;
115
116
this . options = Object . assign ( { } , options ) ;
116
117
@@ -161,8 +162,8 @@ class ForkTsCheckerWebpackPlugin {
161
162
this . doneCallback = this . createDoneCallback ( ) ;
162
163
163
164
// 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 ;
166
167
this . tslintVersion = this . tslint
167
168
? // tslint:disable-next-line:no-implicit-dependencies
168
169
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
plugin . tslintPath || false ,
80
81
[ compiler . context ] ,
You can’t perform that action at this time.
0 commit comments