UNPKG

475 BPlain TextView Raw
1import * as path from "path";
2import * as tsTypes from "typescript";
3import { tsModule } from "./tsproxy";
4
5export class FormatHost implements tsTypes.FormatDiagnosticsHost
6{
7 public getCurrentDirectory(): string
8 {
9 return tsModule.sys.getCurrentDirectory();
10 }
11
12 public getCanonicalFileName(fileName: string): string
13 {
14 return path.normalize(fileName);
15 }
16
17 public getNewLine(): string
18 {
19 return tsModule.sys.newLine;
20 }
21}
22
23export const formatHost = new FormatHost();