typedoc-theme-yaf
Version:
A fresh, opinionated and standalone front-end documentation application consuming Typedoc generated data.
47 lines (46 loc) • 1.59 kB
TypeScript
import { DefaultTheme, PageEvent, Reflection, Renderer, RendererEvent, DefaultThemeRenderContext } from 'typedoc';
import { highlighter } from '../types/backendTypes';
/**
* This extends the TypeDoc default theme and provides a collection of overrides and methods to serialise and save data fragments
* for consumption by the theme single page application (SPA) frontend.
*
*/
export declare class YafTheme extends DefaultTheme {
/**
* A placeholder for the replacement MD highlighter which is injected at {@link backend.load}.
*/
static highlighter: highlighter;
constructor(renderer: Renderer);
/**
* We do not have, or need the `PageEvent` function parameter of the default typedoc call,
* so override the default function.
* @returns the theme render `context`
*/
getRenderContext(): DefaultThemeRenderContext;
/**
* Prevents the default typedoc `render` call from saving pages to html.
* @param page
* @returns
*/
render(page: PageEvent<Reflection>): string;
/**
* Triggered at the typedoc `RendererEvent.BEGIN` event.
*
* It prepares various items of data that are to be consumed by the theme front-end;
*
* @param output
*/
prepareYafTheme: (output: RendererEvent) => void;
/**
* A collection of methods to work with data and files.
*
* @group Factories
*/
private static fileFactory;
/**
* A collection of methods to create data for saving as frontend assets.
*
* @group Factories
*/
private static factory;
}