(fileName: string)
| 177 | this.scheduleFlushOpenQueuedFiles(); |
| 178 | }); |
| 179 | } |
| 180 | |
| 181 | private doOpenFile(fileName: string): OpenFileResult { |
| 182 | this.logger?.debug?.(`Opening file ${fileName}`); |
| 183 | const sourceFile = this.project.openSourceFile(fileName); |
| 184 | const relativeImportPaths = getImportStringLiteralsFromSourceFile(sourceFile).map((lit) => lit.text); |
| 185 | const isTypeScriptFile = fileName.endsWith('.ts') || fileName.endsWith('.tsx'); |
| 186 | const importPaths: OpenFileImportPath[] = relativeImportPaths.map((i) => { |
| 187 | return { relative: i, absolute: this.resolveImportPath(sourceFile.fileName, i) }; |
| 188 | }); |
| 189 | |
| 190 | return { |
| 191 | importPaths, |
| 192 | isNonModuleWithAmbiantDeclarations: isTypeScriptFile && isNonModuleWithAmbiantDeclarations(sourceFile), |
| 193 | }; |
| 194 | } |
| 195 |
no test coverage detected