UNPKG

@jsdocs-io/extractor

Version:

The API extractor for npm packages powering jsdocs.io

18 lines (16 loc) 684 B
import type { NormalizedPackageJson } from "read-pkg"; /** `GetPackageTypesOptions` contains the options for calling {@link getPackageTypes}. */ export interface GetPackageTypesOptions { /** The contents of the `package.json` file. */ pkgJson: Partial<NormalizedPackageJson>; /** The subpath for which to resolve the `types` condition. @defaultValue `.` (package root) */ subpath?: string; } /** `getPackageTypes` returns the TypeScript type definition file (e.g., `index.d.ts`) that acts as the entry point for the package at the given subpath. */ export declare function getPackageTypes({ pkgJson, subpath, }: GetPackageTypesOptions): string | undefined;