UNPKG

@jsdocs-io/extractor

Version:

The API extractor for npm packages powering jsdocs.io

22 lines (20 loc) 867 B
import { Project, type SourceFile } from "ts-morph"; /** `GetProjectOptions` contains the options for calling {@link getProject}. */ export interface GetProjectOptions { /** Path to the types entry point file. */ indexFilePath: string; /** Directory where the `@types` packages are installed. @see {@link https://www.typescriptlang.org/tsconfig/#typeRoots} */ typeRoots: string; } /** `GetProjectReturn` contains the data returned by {@link getProject}. */ export interface GetProjectReturn { /** `Project` created with `ts-morph`. */ project: Project; /** `SourceFile` created with `ts-morph` representing the index file. */ indexFile: SourceFile; } /** `getProject` returns a `ts-morph` TypeScript compiler project. */ export declare function getProject({ indexFilePath, typeRoots }: GetProjectOptions): GetProjectReturn;