-
Notifications
You must be signed in to change notification settings - Fork 12
/
temml.d.ts
60 lines (52 loc) · 1.57 KB
/
temml.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
export interface Options {
displayMode?: boolean;
annotate?: boolean;
leqno?: boolean;
throwOnError?: boolean;
errorColor?: string;
macros?: Record<string, string>;
wrap?: "tex" | "=" | "none";
xml?: boolean;
colorIsTextColor?: boolean;
strict?: boolean;
trust?: boolean | ((context: any) => boolean);
maxSize?: [number, number];
maxExpand?: number;
}
export function render(
expression: string,
baseNode: HTMLElement,
options?: Options,
): void;
export function renderToString(expression: string, options?: Options): string;
export function generateParseTree(expression: string, options?: Options): any;
export function definePreamble(expression: string, options?: Options): any;
export function renderToMathMLTree(expression: string, options?: Options): any;
declare function postProcess(block: any): void;
declare function defineMacro(name: string, body: any): void;
declare function defineSymbol(
mode: string,
group: string,
replace: string,
name: string,
acceptUnicodeChar: boolean,
): void;
declare class ParseError {
constructor(
message: string, // The error message
token: any, // An object providing position information
);
}
declare const Temml: {
version: string;
render: typeof render;
renderToString: typeof renderToString;
postProcess: typeof postProcess;
ParseError: typeof ParseError;
definePreamble: typeof definePreamble;
__parse: typeof generateParseTree;
__renderToMathMLTree: typeof renderToMathMLTree;
__defineSymbol: typeof defineSymbol;
__defineMacro: typeof defineMacro;
};
export default Temml;