(writeFileCallback)
| 117412 | return 2 /* StructureIsReused.Completely */; |
| 117413 | } |
| 117414 | function getEmitHost(writeFileCallback) { |
| 117415 | return { |
| 117416 | getPrependNodes: getPrependNodes, |
| 117417 | getCanonicalFileName: getCanonicalFileName, |
| 117418 | getCommonSourceDirectory: program.getCommonSourceDirectory, |
| 117419 | getCompilerOptions: program.getCompilerOptions, |
| 117420 | getCurrentDirectory: function () { return currentDirectory; }, |
| 117421 | getNewLine: function () { return host.getNewLine(); }, |
| 117422 | getSourceFile: program.getSourceFile, |
| 117423 | getSourceFileByPath: program.getSourceFileByPath, |
| 117424 | getSourceFiles: program.getSourceFiles, |
| 117425 | getLibFileFromReference: program.getLibFileFromReference, |
| 117426 | isSourceFileFromExternalLibrary: isSourceFileFromExternalLibrary, |
| 117427 | getResolvedProjectReferenceToRedirect: getResolvedProjectReferenceToRedirect, |
| 117428 | getProjectReferenceRedirect: getProjectReferenceRedirect, |
| 117429 | isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect, |
| 117430 | getSymlinkCache: getSymlinkCache, |
| 117431 | writeFile: writeFileCallback || writeFile, |
| 117432 | isEmitBlocked: isEmitBlocked, |
| 117433 | readFile: function (f) { return host.readFile(f); }, |
| 117434 | fileExists: function (f) { |
| 117435 | // Use local caches |
| 117436 | var path = toPath(f); |
| 117437 | if (getSourceFileByPath(path)) |
| 117438 | return true; |
| 117439 | if (ts.contains(missingFilePaths, path)) |
| 117440 | return false; |
| 117441 | // Before falling back to the host |
| 117442 | return host.fileExists(f); |
| 117443 | }, |
| 117444 | useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); }, |
| 117445 | getProgramBuildInfo: function () { return program.getProgramBuildInfo && program.getProgramBuildInfo(); }, |
| 117446 | getSourceFileFromReference: function (file, ref) { return program.getSourceFileFromReference(file, ref); }, |
| 117447 | redirectTargetsMap: redirectTargetsMap, |
| 117448 | getFileIncludeReasons: program.getFileIncludeReasons, |
| 117449 | }; |
| 117450 | } |
| 117451 | function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) { |
| 117452 | host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); |
| 117453 | } |
no test coverage detected
searching dependent graphs…