@@ -22,14 +22,14 @@ export type ComponentMetaChecker = ReturnType<typeof baseCreate>;
2222const windowsPathReg = / \\ / g;
2323
2424export function createComponentMetaCheckerByJsonConfig (
25- root : string ,
25+ _rootPath : string ,
2626 json : any ,
2727 checkerOptions : MetaCheckerOptions = { } ,
2828 ts : typeof import ( 'typescript/lib/tsserverlibrary' ) = require ( 'typescript' ) ,
2929) {
30- const rootPath = ( root as path . OsPath ) . replace ( windowsPathReg , '/' ) as path . PosixPath ;
30+ const rootPath = _rootPath . replace ( windowsPathReg , '/' ) as path . PosixPath ;
3131 return createComponentMetaCheckerWorker (
32- ( ) => vue . createParsedCommandLineByJson ( ts , ts . sys , root , json ) ,
32+ ( ) => vue . createParsedCommandLineByJson ( ts , ts . sys , rootPath , json ) ,
3333 checkerOptions ,
3434 rootPath ,
3535 path . join ( rootPath , 'jsconfig.json.global.vue' as path . PosixPath ) ,
@@ -38,13 +38,13 @@ export function createComponentMetaCheckerByJsonConfig(
3838}
3939
4040export function createComponentMetaChecker (
41- tsconfigPath : string ,
41+ _tsconfig : string ,
4242 checkerOptions : MetaCheckerOptions = { } ,
4343 ts : typeof import ( 'typescript/lib/tsserverlibrary' ) = require ( 'typescript' ) ,
4444) {
45- const tsconfig = ( tsconfigPath as path . OsPath ) . replace ( windowsPathReg , '/' ) as path . PosixPath ;
45+ const tsconfig = _tsconfig . replace ( windowsPathReg , '/' ) as path . PosixPath ;
4646 return createComponentMetaCheckerWorker (
47- ( ) => vue . createParsedCommandLine ( ts , ts . sys , tsconfigPath ) ,
47+ ( ) => vue . createParsedCommandLine ( ts , ts . sys , tsconfig ) ,
4848 checkerOptions ,
4949 path . dirname ( tsconfig ) ,
5050 tsconfig + '.global.vue' ,
@@ -152,11 +152,11 @@ export function baseCreate(
152152 return _host [ prop as keyof typeof _host ] ;
153153 } ,
154154 } ) as vue . TypeScriptLanguageHost ;
155- const vueLanguages = ts ? vue . createLanguages (
155+ const vueLanguages = vue . createLanguages (
156+ ts ,
156157 host . getCompilationSettings ( ) ,
157158 vueCompilerOptions ,
158- ts ,
159- ) : [ ] ;
159+ ) ;
160160 const core = vue . createLanguageContext ( host , vueLanguages ) ;
161161 const tsLsHost = createLanguageServiceHost ( core , ts , ts . sys ) ;
162162 const tsLs = ts . createLanguageService ( tsLsHost ) ;
0 commit comments