1 | import * as path from "path";
|
2 | import * as tsTypes from "typescript";
|
3 | import { tsModule } from "./tsproxy";
|
4 |
|
5 | export 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 |
|
23 | export const formatHost = new FormatHost();
|