(configFileFs: MockConfigFileFs)
| 115 | } |
| 116 | |
| 117 | function createHost(configFileFs: MockConfigFileFs): ts.server.ServerHost { |
| 118 | return { |
| 119 | ...ts.sys, |
| 120 | fileExists(absPath: string): boolean { |
| 121 | return configFileFs.fileExists(absPath); |
| 122 | }, |
| 123 | readFile(absPath: string, encoding?: string): string | undefined { |
| 124 | return configFileFs.readFile(absPath, encoding); |
| 125 | }, |
| 126 | watchFile(path: string, callback: ts.FileWatcherCallback): ts.FileWatcher { |
| 127 | return configFileFs.watchFile(path, callback); |
| 128 | }, |
| 129 | watchDirectory(path: string, callback: ts.DirectoryWatcherCallback): ts.FileWatcher { |
| 130 | return NOOP_FILE_WATCHER; |
| 131 | }, |
| 132 | setTimeout(callback: (...args: any[]) => void, delay: number, ...args: any[]) { |
| 133 | return setTimeout(callback, delay, ...args); |
| 134 | }, |
| 135 | clearTimeout(id: any) { |
| 136 | clearTimeout(id); |
| 137 | }, |
| 138 | setImmediate() { |
| 139 | throw new Error('setImmediate is not implemented'); |
| 140 | }, |
| 141 | clearImmediate() { |
| 142 | throw new Error('clearImmediate is not implemented'); |
| 143 | }, |
| 144 | }; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * Create a ConfiguredProject and an actual program for the test project located |
no outgoing calls
no test coverage detected
searching dependent graphs…