@jsdocs-io/extractor
Version:
Analyze and extract the API from npm packages
24 lines • 1.07 kB
TypeScript
import * as tsm from 'ts-morph';
import { PackageAPI } from '../types/package-api';
import { TaggedGitRepository } from '../types/tagged-git-repository';
/**
* `extractPackageAPI` extracts the public API from a package.
*
* @param fileSystem - filesystem containing the package's source code
* @param entryPoint - absolute path of the file acting as the package's entry point
* @param maxDepth - maximum depth for analyzing nested namespaces (default: `5`)
* @param pattern - file pattern including files to be analyzed
* @param repository - a tagged git repository to enable linking to source
* @param id - npm-style package ID used for logging (for example, `foo@1.0.0`)
*
* @see {@link PackageAPI}
*/
export declare function extractPackageAPI({ fileSystem, entryPoint, maxDepth, pattern, repository, id, }: {
fileSystem: tsm.FileSystemHost;
entryPoint: string;
maxDepth?: number;
pattern?: string;
repository?: TaggedGitRepository;
id?: string;
}): PackageAPI;
//# sourceMappingURL=extract-package-api.d.ts.map