UNPKG

851 BTypeScriptView Raw
1import * as ts from 'typescript';
2import type { ASTAndDefiniteProgram } from './shared';
3export interface ProvidedProgramsSettings {
4 filePath: string;
5 tsconfigRootDir: string;
6}
7declare function useProvidedPrograms(programInstances: Iterable<ts.Program>, { filePath, tsconfigRootDir }: ProvidedProgramsSettings): ASTAndDefiniteProgram | undefined;
8/**
9 * Utility offered by parser to help consumers construct their own program instance.
10 *
11 * @param configFile the path to the tsconfig.json file, relative to `projectDirectory`
12 * @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()`
13 */
14declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program;
15export { useProvidedPrograms, createProgramFromConfigFile };
16//# sourceMappingURL=useProvidedPrograms.d.ts.map
\No newline at end of file