mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-21 08:25:43 -05:00
Don't expose EmitHost. it is only used by a non-exposed function.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
module ts {
|
||||
var nextSymbolId = 1;
|
||||
var nextNodeId = 1;
|
||||
var nextMergeId = 1;
|
||||
var nextMergeId = 1;
|
||||
|
||||
/// fullTypeCheck denotes if this instance of the typechecker will be used to get semantic diagnostics.
|
||||
/// If fullTypeCheck === true, then the typechecker should do every possible check to produce all errors
|
||||
|
||||
@@ -1462,6 +1462,17 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
@@ -906,6 +906,12 @@ module ts {
|
||||
identifiers: Map<string>;
|
||||
}
|
||||
|
||||
export interface ScriptReferenceHost {
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
getSourceFile(filename: string): SourceFile;
|
||||
getCurrentDirectory(): string;
|
||||
}
|
||||
|
||||
export interface Program extends ScriptReferenceHost {
|
||||
getSourceFiles(): SourceFile[];
|
||||
getCompilerHost(): CompilerHost;
|
||||
@@ -972,24 +978,6 @@ module ts {
|
||||
|
||||
getSourceFiles(): SourceFile[];
|
||||
getSourceFile(filename: string): SourceFile;
|
||||
//getSourceFiles(): SourceFile[];
|
||||
//getCompilerOptions(): CompilerOptions;
|
||||
|
||||
//getDiagnostics(sourceFile?: SourceFile): Diagnostic[];
|
||||
//getGlobalDiagnostics(): Diagnostic[];
|
||||
//getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[];
|
||||
|
||||
//// Gets a type checker that can be used to semantically analyze source fils in the program.
|
||||
//// The 'produceDiagnostics' flag determines if the checker will produce diagnostics while
|
||||
//// analyzing the code. It can be set to 'false' to make many type checking operaitons
|
||||
//// faster. With this flag set, the checker can avoid codepaths only necessary to produce
|
||||
//// diagnostics, but not necessary to answer semantic questions about the code.
|
||||
////
|
||||
//// If 'produceDiagnostics' is false, then any calls to get diagnostics from the TypeChecker
|
||||
//// will throw an invalid operation exception.
|
||||
//getTypeChecker(produceDiagnostics: boolean): TypeChecker;
|
||||
//getCommonSourceDirectory(): string;
|
||||
//emitFiles(targetSourceFile?: SourceFile): EmitResult;
|
||||
}
|
||||
|
||||
export interface TypeChecker {
|
||||
@@ -1100,23 +1088,6 @@ module ts {
|
||||
errorModuleName?: string // If the symbol is not visible from module, module's name
|
||||
}
|
||||
|
||||
export interface ScriptReferenceHost {
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
getSourceFile(filename: string): SourceFile;
|
||||
getCurrentDirectory(): 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;
|
||||
}
|
||||
|
||||
export interface EmitResolver {
|
||||
getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string;
|
||||
getExpressionNamePrefix(node: Identifier): string;
|
||||
|
||||
Reference in New Issue
Block a user