Merge pull request #2414 from Microsoft/createSourceFile

Expose setParentNodes on createCompilerHost
This commit is contained in:
Mohamed Hegazy
2015-03-18 14:35:04 -07:00
9 changed files with 18 additions and 14 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ module ts {
/** The version of the TypeScript compiler release */
export let version = "1.5.0.0";
export function createCompilerHost(options: CompilerOptions): CompilerHost {
export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost {
let currentDirectory: string;
let existingDirectories: Map<boolean> = {};
@@ -38,7 +38,7 @@ module ts {
}
text = "";
}
return text !== undefined ? createSourceFile(fileName, text, languageVersion) : undefined;
return text !== undefined ? createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
}
function directoryExists(directoryPath: string): boolean {
@@ -1472,7 +1472,7 @@ declare module "typescript" {
declare module "typescript" {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@@ -4714,10 +4714,11 @@ declare module "typescript" {
let version: string;␍
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions) => CompilerHost
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost
>options : CompilerOptions
>CompilerOptions : CompilerOptions
>setParentNodes : boolean
>CompilerHost : CompilerHost
function getPreEmitDiagnostics(program: Program): Diagnostic[];␍
@@ -1503,7 +1503,7 @@ declare module "typescript" {
declare module "typescript" {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@@ -4860,10 +4860,11 @@ declare module "typescript" {
let version: string;␍
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions) => CompilerHost
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost
>options : CompilerOptions
>CompilerOptions : CompilerOptions
>setParentNodes : boolean
>CompilerHost : CompilerHost
function getPreEmitDiagnostics(program: Program): Diagnostic[];␍
@@ -1504,7 +1504,7 @@ declare module "typescript" {
declare module "typescript" {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@@ -4810,10 +4810,11 @@ declare module "typescript" {
let version: string;␍
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions) => CompilerHost
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;␍
>createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost
>options : CompilerOptions
>CompilerOptions : CompilerOptions
>setParentNodes : boolean
>CompilerHost : CompilerHost
function getPreEmitDiagnostics(program: Program): Diagnostic[];␍
@@ -1541,7 +1541,7 @@ declare module "typescript" {
declare module "typescript" {
/** The version of the TypeScript compiler release */
let version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program;
@@ -4983,10 +4983,11 @@ declare module "typescript" {
let version: string;
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;
>createCompilerHost : (options: CompilerOptions) => CompilerHost
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
>createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost
>options : CompilerOptions
>CompilerOptions : CompilerOptions
>setParentNodes : boolean
>CompilerHost : CompilerHost
function getPreEmitDiagnostics(program: Program): Diagnostic[];