diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ef9a31d5872..186dd7b0758 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1461,18 +1461,7 @@ module ts { referencePathsOutput, } } - - export interface EmitHost extends ScriptReferenceHost { - getSourceFiles(): SourceFile[]; - isEmitBlocked(sourceFile?: SourceFile): boolean; - - getCommonSourceDirectory(): string; - getCanonicalFileName(fileName: string): string; - getNewLine(): string; - - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - } - + export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, targetSourceFile: SourceFile): Diagnostic[] { var diagnostics: Diagnostic[] = []; var jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 2c2c46805f6..7494ec9f6cb 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -23,6 +23,17 @@ module ts { string(): string; } + export interface EmitHost extends ScriptReferenceHost { + getSourceFiles(): SourceFile[]; + isEmitBlocked(sourceFile?: SourceFile): boolean; + + getCommonSourceDirectory(): string; + getCanonicalFileName(fileName: string): string; + getNewLine(): string; + + writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + } + // Pool writers to avoid needing to allocate them for every symbol we write. var stringWriters: StringSymbolWriter[] = []; export function getSingleLineStringWriter(): StringSymbolWriter {