(
fileName: string,
languageVersion: ts.ScriptTarget,
onError?: (message: string) => void,
shouldCreateNewSourceFile?: boolean,
)
| 432 | private writtenFiles = new Set<string>(); |
| 433 | |
| 434 | override getSourceFile( |
| 435 | fileName: string, |
| 436 | languageVersion: ts.ScriptTarget, |
| 437 | onError?: (message: string) => void, |
| 438 | shouldCreateNewSourceFile?: boolean, |
| 439 | ): ts.SourceFile | undefined { |
| 440 | if (this.cache.has(fileName)) { |
| 441 | return this.cache.get(fileName)!; |
| 442 | } |
| 443 | const sf = super.getSourceFile(fileName, languageVersion); |
| 444 | if (sf !== undefined) { |
| 445 | this.cache.set(sf.fileName, sf); |
| 446 | } |
| 447 | return sf; |
| 448 | } |
| 449 | |
| 450 | flushWrittenFileTracking(): void { |
| 451 | this.writtenFiles.clear(); |
no test coverage detected