@jsdocs-io/extractor
Version:
Analyze and extract the API from npm packages
31 lines • 1.29 kB
TypeScript
import * as tsm from 'ts-morph';
import { ModuleDeclarations } from '../types/module-declarations';
import { SourceProvider } from './source-provider';
import { TypeChecker } from './type-checker';
declare type Module = tsm.SourceFile | tsm.ModuleDeclaration;
export declare function getPackageDeclarations({ project, indexFile, getSource, getType, maxDepth, }: {
project: tsm.Project;
indexFile: tsm.SourceFile;
getSource: SourceProvider;
getType: TypeChecker;
maxDepth?: number;
}): ModuleDeclarations;
/**
* `getModuleDeclarations` extracts the public declarations from the given module.
*
* @param module - module (for example, a source file, node or namespace)
* @param maxDepth - maximum extraction depth for inner modules
* @param getSource - source provider
* @param getType - type checker
* @param moduleName - module's name, used to define IDs for declarations (optional)
*/
export declare function getModuleDeclarations({ module, moduleName, maxDepth, getSource, getType, project, }: {
module: Module;
moduleName: string;
maxDepth: number;
getSource: SourceProvider;
getType: TypeChecker;
project?: tsm.Project;
}): ModuleDeclarations;
export {};
//# sourceMappingURL=get-package-declarations.d.ts.map