import type { SignatureReflection, TypeDocOptions } from 'typedoc'; import { loadProject, selectApiMethodSignatures, selectApiModules, } from '../../../scripts/apidoc/typedoc'; import { mapByName } from '../../../scripts/apidoc/utils'; /** * Returns a record with the (Module-Name -> (Method-Name -> Method-Signature)) for the project. */ export function loadProjectModules( options?: Partial, includeTestModules = false ): Record> { const [, project] = loadProject(options); const modules = selectApiModules(project, includeTestModules); return mapByName(modules, selectApiMethodSignatures); } /** * Loads the example methods using TypeDoc. */ export function loadExampleMethods(): Record { return loadProjectModules( { entryPoints: ['test/scripts/apidoc/signature.example.ts'], tsconfig: 'test/scripts/apidoc/tsconfig.json', }, true )['SignatureTest']; }