1 | /**
|
2 | * Custom JSX module designed specifically for TypeDoc's needs.
|
3 | * When overriding a default TypeDoc theme output, your implementation must create valid {@link Element}
|
4 | * instances, which can be most easily done by using TypeDoc's JSX implementation. To use it, set up
|
5 | * your tsconfig with the following compiler options:
|
6 | * ```json
|
7 | * {
|
8 | * "jsx": "react",
|
9 | * "jsxFactory": "JSX.createElement",
|
10 | * "jsxFragmentFactory": "JSX.Fragment"
|
11 | * }
|
12 | * ```
|
13 | * @summary Custom JSX module designed specifically for TypeDoc's needs.
|
14 | * @module
|
15 | */
|
16 | import type { IntrinsicElements, JsxElement, JsxChildren, JsxComponent, JsxHtmlGlobalProps } from "./jsx.elements.js";
|
17 | export type { JsxElement as Element, JsxChildren as Children, JsxComponent, } from "./jsx.elements.js";
|
18 | export { JsxFragment as Fragment } from "./jsx.elements.js";
|
19 | /**
|
20 | * Used to inject HTML directly into the document.
|
21 | */
|
22 | export declare function Raw(_props: {
|
23 | html: string;
|
24 | }): null;
|
25 | /**
|
26 | * TypeScript's rules for looking up the JSX.IntrinsicElements and JSX.Element
|
27 | * interfaces are incredibly strange. It will find them if they are included as
|
28 | * a namespace under the createElement function, or globally, or, apparently, if
|
29 | * a JSX namespace is declared at the same scope as the factory function.
|
30 | * Hide this in the docs, hopefully someday TypeScript improves this and allows
|
31 | * looking adjacent to the factory function and we can get rid of this phantom namespace.
|
32 | * @hidden
|
33 | */
|
34 | export declare namespace JSX {
|
35 | export { IntrinsicElements, JsxElement as Element, JsxHtmlGlobalProps as IntrinsicAttributes, };
|
36 | }
|
37 | /**
|
38 | * JSX factory function to create an "element" that can later be rendered with {@link renderElement}
|
39 | * @param tag
|
40 | * @param props
|
41 | * @param children
|
42 | */
|
43 | export declare function createElement(tag: string | JsxComponent<any>, props: object | null, ...children: JsxChildren[]): JsxElement;
|
44 | export declare function setRenderSettings(options: {
|
45 | pretty: boolean;
|
46 | }): void;
|
47 | export declare function renderElement(element: JsxElement | null | undefined): string;
|
48 | /**
|
49 | * Render an element to text, stripping out any HTML tags.
|
50 | * This is roughly equivalent to getting `innerText` on a rendered element.
|
51 | * @internal
|
52 | */
|
53 | export declare function renderElementToText(element: JsxElement | null | undefined): string;
|