mirror of
https://github.com/ezolenko/rollup-plugin-typescript2.git
synced 2025-12-08 19:06:16 +00:00
24 lines
475 B
TypeScript
24 lines
475 B
TypeScript
import * as path from "path";
|
|
import * as tsTypes from "typescript";
|
|
import { tsModule } from "./tsproxy";
|
|
|
|
export class FormatHost implements tsTypes.FormatDiagnosticsHost
|
|
{
|
|
public getCurrentDirectory(): string
|
|
{
|
|
return tsModule.sys.getCurrentDirectory();
|
|
}
|
|
|
|
public getCanonicalFileName(fileName: string): string
|
|
{
|
|
return path.normalize(fileName);
|
|
}
|
|
|
|
public getNewLine(): string
|
|
{
|
|
return tsModule.sys.newLine;
|
|
}
|
|
}
|
|
|
|
export const formatHost = new FormatHost();
|