@jsdocs-io/extractor
Version:
The API extractor for npm packages powering jsdocs.io
16 lines (15 loc) • 817 B
TypeScript
import type { Project, SourceFile } from "ts-morph";
import type { ExtractedDeclaration } from "./types.js";
/** `GetPackageDeclarationsOptions` contains the options for calling {@link getPackageDeclarations}. */
export interface GetPackageDeclarationsOptions {
/** Package name. */
pkgName: string;
/** `Project` created with `ts-morph`. */
project: Project;
/** `SourceFile` created with `ts-morph` representing the index file. */
indexFile: SourceFile;
/** Depth limit for the extraction. */
maxDepth: number;
}
/** `getPackageDeclarations` extracts the declarations exported from the given project representing a package. */
export declare function getPackageDeclarations({ pkgName, project, indexFile, maxDepth, }: GetPackageDeclarationsOptions): Promise<ExtractedDeclaration[]>;