UNPKG

1.67 kBTypeScriptView Raw
1import { ProjectReflection, Reflection } from 'typedoc';
2/**
3 * An event emitted before and after the markdown of a page is rendered.
4 *
5 * @event
6 */
7export declare class MarkdownPageEvent<
8/** @ignore **/ Model = Reflection> extends Event {
9 /**
10 * The {@linkcode typedoc!ProjectReflection ProjectReflection} instance the renderer is currently processing.
11 */
12 project: ProjectReflection;
13 /**
14 * The model that that is being rendered on this page.
15 * Either a {@linkcode typedoc!DeclarationReflection DeclarationReflection} or {@linkcode typedoc!ProjectReflection ProjectReflection}.
16 */
17 readonly model: Model;
18 /**
19 * The final markdown `string` content of the page.
20 *
21 * Should be rendered by layout templates and can be modified by plugins.
22 */
23 contents?: string;
24 /**
25 * The url `string` of the page.
26 */
27 url: string;
28 /**
29 * The complete `string` filename where the file will be written..
30 */
31 filename: string;
32 /**
33 * The frontmatter of this page represented as a key value object. This property can be utilised by other plugins.
34 */
35 frontmatter?: Record<string, any>;
36 /** @hidden */
37 pageHeadings: any;
38 /** @hidden */
39 pageSections: any;
40 /** @hidden */
41 startNewSection: any;
42 /**
43 * Triggered before a document will be rendered.
44 * @event
45 */
46 static readonly BEGIN = "beginPage";
47 /**
48 * Triggered after a document has been rendered, just before it is written to disc.
49 * @event
50 */
51 static readonly END = "endPage";
52 /**
53 * @ignore
54 */
55 constructor(name: string, model: Model);
56}