@@ -488,6 +488,17 @@ namespace ts {
488488 } ;
489489 }
490490
491+ /**
492+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
493+ * that represent a compilation unit.
494+ *
495+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
496+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
497+ *
498+ * @param createProgramOptions - The options for creating a program.
499+ * @returns A 'Program' object.
500+ */
501+ export function createProgram ( createProgramOptions : CreateProgramOptions ) : Program ;
491502 /**
492503 * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
493504 * that represent a compilation unit.
@@ -502,7 +513,6 @@ namespace ts {
502513 * @param configFileParsingDiagnostics - error during config file parsing
503514 * @returns A 'Program' object.
504515 */
505- export function createProgram ( createProgramOptions : CreateProgramOptions ) : Program ;
506516 export function createProgram ( rootNames : ReadonlyArray < string > , options : CompilerOptions , host ?: CompilerHost , oldProgram ?: Program , configFileParsingDiagnostics ?: ReadonlyArray < Diagnostic > ) : Program ;
507517 export function createProgram ( rootNamesOrOptions : ReadonlyArray < string > | CreateProgramOptions , _options ?: CompilerOptions , _host ?: CompilerHost , _oldProgram ?: Program , _configFileParsingDiagnostics ?: ReadonlyArray < Diagnostic > ) : Program {
508518 const createProgramOptions = isArray ( rootNamesOrOptions ) ? createCreateProgramOptions ( rootNamesOrOptions , _options ! , _host , _oldProgram , _configFileParsingDiagnostics ) : rootNamesOrOptions ; // TODO: GH#18217
0 commit comments