main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
879 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import type { Document } from '../doc/Document.js';
|
---|
| 2 | import type { Node } from './Node.js';
|
---|
| 3 | export interface AnchorData {
|
---|
| 4 | aliasCount: number;
|
---|
| 5 | count: number;
|
---|
| 6 | res: unknown;
|
---|
| 7 | }
|
---|
| 8 | export interface ToJSContext {
|
---|
| 9 | anchors: Map<Node, AnchorData>;
|
---|
| 10 | doc: Document<Node, boolean>;
|
---|
| 11 | keep: boolean;
|
---|
| 12 | mapAsMap: boolean;
|
---|
| 13 | mapKeyWarned: boolean;
|
---|
| 14 | maxAliasCount: number;
|
---|
| 15 | onCreate?: (res: unknown) => void;
|
---|
| 16 | }
|
---|
| 17 | /**
|
---|
| 18 | * Recursively convert any node or its contents to native JavaScript
|
---|
| 19 | *
|
---|
| 20 | * @param value - The input value
|
---|
| 21 | * @param arg - If `value` defines a `toJSON()` method, use this
|
---|
| 22 | * as its first argument
|
---|
| 23 | * @param ctx - Conversion context, originally set in Document#toJS(). If
|
---|
| 24 | * `{ keep: true }` is not set, output should be suitable for JSON
|
---|
| 25 | * stringification.
|
---|
| 26 | */
|
---|
| 27 | export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.