import { ClassTrait, CommentSection, TypedocNode, ProjectTrait, SignaturesTrait, SymbolTrait } from './typedoc-models'; import { TsSrcElements } from './generate-ts-inputs'; import { Attribute, Documentation, Module, Semantic, File, Type, Code, Callable, ChildModule } from '../../lib/code-api'; /** * Global project information. */ export type ProjectGlobals = { /** * Map `node.id` => navigation path */ navigations: { [k: number]: string; }; /** * Map `navigation path` => source information */ tsInputs: TsSrcElements; /** * Map `node.id` => `TypedocNode` */ typedocIdMap: { [k: number]: TypedocNode; }; /** * Map `node.id` => parent's node `TypedocNode` */ typedocParentIdMap: { [k: number]: TypedocNode; }; }; export declare function gatherTsFiles({ typedocNode, }: { typedocNode: TypedocNode & ProjectTrait; }): Set; /** * Entry point function to generate API files. * * @param _options The args * @param _options.projectFolder The folder of the project to document. * @param _options.outputFolder The output folder. * @param _options.baseNav The base path of the API node in the navigation (*e.g.* `/api`). */ export declare function generateApiFiles({ projectFolder, outputFolder, baseNav, }: { projectFolder: string; outputFolder: string; baseNav: string; }): void; export declare function generateNavigationPathsInModule(basePath: string, module: string, elem: TypedocNode): {}; /** * Parse a module from typedoc & TS inputs. * * @param _args the arguments * @param _args.typedocNode Typedoc's module node. * @param _args.modulePath The module path. * @param _args.tsInputs The (global) typescript inputs. * @param _args.baseNav The base path of the API node in the navigation (*e.g.* `/api`). */ export declare function parseModule({ typedocNode, modulePath, tsInputs, baseNav, }: { typedocNode: TypedocNode; modulePath: string; tsInputs: TsSrcElements; baseNav: string; }): Module; /** * Parse a child module. * * @param _args * @param _args.typedocNode Input node. * @param _args.parentPath Parent path. * @returns Ouput structure. */ export declare function parseChildModule({ typedocNode, parentPath, }: { typedocNode: TypedocNode; parentPath: string; }): ChildModule; /** * Parse a file. * * @param _args * @param _args.path Path of the file. * @param _args.projectGlobals Global project information. * @returns Ouput structure. */ export declare function parseFile({ path, projectGlobals, }: { path: string; projectGlobals: ProjectGlobals; }): File; /** * Parse documentation section. * * @param _args * @param _args.title title of the document section. * @param _args.typedocNode Input node. * @param _args.parent Parent node. * @param _args.projectGlobals Project's global. * @returns Documentation structure. */ export declare function parseDocumentation({ semantic, title, typedocNode, parent, projectGlobals, }: { semantic: Semantic; title?: string; typedocNode: CommentSection; parent: TypedocNode; projectGlobals: ProjectGlobals; }): Documentation; /** * Parse a symbol to extract code information. * * @param _args * @param _args.typedocNode Input node. * @param _args.references Symbol's type references in declaration. * @param _args.parentElement Parent node of the documentation. * @param _args.projectGlobals Project's global. * @returns Code element. */ export declare function parseCode({ typedocNode, projectGlobals, references, parentElement, }: { typedocNode: TypedocNode & SymbolTrait; projectGlobals: ProjectGlobals; references: { [_name: string]: string; }; parentElement?: TypedocNode; }): Code; /** * Parse a callable to extract code information. * * @param _args * @param _args.typedocNode Input node. * @param _args.semantic Semantic definition of the callable. * @param _args.parentElement Parent node of the documentation. * @param _args.projectGlobals Project's global. * @returns Callable element. */ export declare function parseCallable({ typedocNode, semantic, projectGlobals, parentElement, }: { typedocNode: TypedocNode & SignaturesTrait; parentPath: string; semantic: Semantic; projectGlobals?: ProjectGlobals; parentElement?: TypedocNode; }): Callable; /** * Parse a type to extract code information. * * @param _args * @param _args.typedocNode Input node. * @param _args.parentPath Parent navigation path. * @param _args.projectGlobals Project's global. * @returns Type element. */ export declare function parseType({ typedocNode, parentPath, projectGlobals, }: { typedocNode: TypedocNode & ClassTrait; parentPath: string; projectGlobals: ProjectGlobals; }): Type; /** * Parse an attribute. * * @param _args * @param _args.typedocNode Input node. * @param _args.parentElement Parent node of the documentation. * @param _args.projectGlobals Project's global. * @returns Callable element. */ export declare function parseAttribute({ typedocNode, projectGlobals, parentElement, }: { typedocNode: TypedocNode & SymbolTrait; projectGlobals: ProjectGlobals; parentPath: string; parentElement?: TypedocNode; }): Attribute;