(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists)
| 18518 | } |
| 18519 | } |
| 18520 | function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile, createDirectory, directoryExists) { |
| 18521 | // PERF: Checking for directory existence is expensive. Instead, assume the directory exists |
| 18522 | // and fall back to creating it if the file write fails. |
| 18523 | try { |
| 18524 | writeFile(path, data, writeByteOrderMark); |
| 18525 | } |
| 18526 | catch (_a) { |
| 18527 | ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(path)), createDirectory, directoryExists); |
| 18528 | writeFile(path, data, writeByteOrderMark); |
| 18529 | } |
| 18530 | } |
| 18531 | ts.writeFileEnsuringDirectories = writeFileEnsuringDirectories; |
| 18532 | function getLineOfLocalPosition(sourceFile, pos) { |
| 18533 | var lineStarts = ts.getLineStarts(sourceFile); |
nothing calls this directly
no test coverage detected