mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix createProgram js docs.
This commit is contained in:
parent
9be846e1f2
commit
7e0ed5ec4d
@ -488,6 +488,17 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
*
|
||||
* Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
|
||||
* triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
|
||||
*
|
||||
* @param createProgramOptions - The options for creating a program.
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
export function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
@ -502,7 +513,6 @@ namespace ts {
|
||||
* @param configFileParsingDiagnostics - error during config file parsing
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
export function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
export function createProgram(rootNames: ReadonlyArray<string>, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray<Diagnostic>): Program;
|
||||
export function createProgram(rootNamesOrOptions: ReadonlyArray<string> | CreateProgramOptions, _options?: CompilerOptions, _host?: CompilerHost, _oldProgram?: Program, _configFileParsingDiagnostics?: ReadonlyArray<Diagnostic>): Program {
|
||||
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options!, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; // TODO: GH#18217
|
||||
|
||||
@ -4022,6 +4022,17 @@ declare namespace ts {
|
||||
function formatDiagnosticsWithColorAndContext(diagnostics: ReadonlyArray<Diagnostic>, host: FormatDiagnosticsHost): string;
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string;
|
||||
function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): ReadonlyArray<Diagnostic>;
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
*
|
||||
* Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
|
||||
* triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
|
||||
*
|
||||
* @param createProgramOptions - The options for creating a program.
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
@ -4036,7 +4047,6 @@ declare namespace ts {
|
||||
* @param configFileParsingDiagnostics - error during config file parsing
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
function createProgram(rootNames: ReadonlyArray<string>, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray<Diagnostic>): Program;
|
||||
}
|
||||
declare namespace ts {
|
||||
|
||||
12
tests/baselines/reference/api/typescript.d.ts
vendored
12
tests/baselines/reference/api/typescript.d.ts
vendored
@ -4022,6 +4022,17 @@ declare namespace ts {
|
||||
function formatDiagnosticsWithColorAndContext(diagnostics: ReadonlyArray<Diagnostic>, host: FormatDiagnosticsHost): string;
|
||||
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain | undefined, newLine: string): string;
|
||||
function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): ReadonlyArray<Diagnostic>;
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
*
|
||||
* Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
|
||||
* triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
|
||||
*
|
||||
* @param createProgramOptions - The options for creating a program.
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
/**
|
||||
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
|
||||
* that represent a compilation unit.
|
||||
@ -4036,7 +4047,6 @@ declare namespace ts {
|
||||
* @param configFileParsingDiagnostics - error during config file parsing
|
||||
* @returns A 'Program' object.
|
||||
*/
|
||||
function createProgram(createProgramOptions: CreateProgramOptions): Program;
|
||||
function createProgram(rootNames: ReadonlyArray<string>, options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: ReadonlyArray<Diagnostic>): Program;
|
||||
}
|
||||
declare namespace ts {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user