mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #2414 from Microsoft/createSourceFile
Expose setParentNodes on createCompilerHost
This commit is contained in:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user