@@ -33,7 +33,7 @@ export type ConfigType = 'js' | 'ts';
3333export class ProjectManager implements Disposable {
3434
3535 /**
36- * Root path (as passed to `initialize` request)
36+ * Root path with slashes
3737 */
3838 private rootPath : string ;
3939
@@ -106,7 +106,14 @@ export class ProjectManager implements Disposable {
106106 * @param strict indicates if we are working in strict mode (VFS) or with a local file system
107107 * @param traceModuleResolution allows to enable module resolution tracing (done by TS compiler)
108108 */
109- constructor ( rootPath : string , inMemoryFileSystem : InMemoryFileSystem , updater : FileSystemUpdater , strict : boolean , traceModuleResolution ?: boolean , protected logger : Logger = new NoopLogger ( ) ) {
109+ constructor (
110+ rootPath : string ,
111+ inMemoryFileSystem : InMemoryFileSystem ,
112+ updater : FileSystemUpdater ,
113+ strict : boolean ,
114+ traceModuleResolution ?: boolean ,
115+ protected logger : Logger = new NoopLogger ( )
116+ ) {
110117 this . rootPath = toUnixPath ( rootPath ) ;
111118 this . updater = updater ;
112119 this . localFs = inMemoryFileSystem ;
@@ -128,7 +135,15 @@ export class ProjectManager implements Disposable {
128135 } ,
129136 include : { js : [ '**/*.js' , '**/*.jsx' ] , ts : [ '**/*.ts' , '**/*.tsx' ] } [ configType ]
130137 } ;
131- const config = new ProjectConfiguration ( this . localFs , trimmedRootPath , this . versions , '' , tsConfig , this . traceModuleResolution , this . logger ) ;
138+ const config = new ProjectConfiguration (
139+ this . localFs ,
140+ trimmedRootPath ,
141+ this . versions ,
142+ '' ,
143+ tsConfig ,
144+ this . traceModuleResolution ,
145+ this . logger
146+ ) ;
132147 configs . set ( trimmedRootPath , config ) ;
133148 fallbackConfigs [ configType ] = config ;
134149 }
@@ -148,7 +163,15 @@ export class ProjectManager implements Disposable {
148163 }
149164 const configType = this . getConfigurationType ( filePath ) ;
150165 const configs = this . configs [ configType ] ;
151- configs . set ( dir , new ProjectConfiguration ( this . localFs , dir , this . versions , filePath , undefined , this . traceModuleResolution , this . logger ) ) ;
166+ configs . set ( dir , new ProjectConfiguration (
167+ this . localFs ,
168+ dir ,
169+ this . versions ,
170+ filePath ,
171+ undefined ,
172+ this . traceModuleResolution ,
173+ this . logger
174+ ) ) ;
152175 // Remove catch-all config (if exists)
153176 if ( configs . get ( trimmedRootPath ) === fallbackConfigs [ configType ] ) {
154177 configs . delete ( trimmedRootPath ) ;
@@ -748,7 +771,15 @@ export class ProjectConfiguration {
748771 * @param configFilePath configuration file path, absolute
749772 * @param configContent optional configuration content to use instead of reading configuration file)
750773 */
751- constructor ( fs : InMemoryFileSystem , rootFilePath : string , versions : Map < string , number > , configFilePath : string , configContent ?: any , traceModuleResolution ?: boolean , private logger : Logger = new NoopLogger ( ) ) {
774+ constructor (
775+ fs : InMemoryFileSystem ,
776+ rootFilePath : string ,
777+ versions : Map < string , number > ,
778+ configFilePath : string ,
779+ configContent ?: any ,
780+ traceModuleResolution ?: boolean ,
781+ private logger : Logger = new NoopLogger ( )
782+ ) {
752783 this . fs = fs ;
753784 this . configFilePath = configFilePath ;
754785 this . configContent = configContent ;
0 commit comments