source: node_modules/yaml/dist/nodes/toJS.d.ts

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
Line 
1import type { Document } from '../doc/Document.js';
2import type { Node } from './Node.js';
3export interface AnchorData {
4 aliasCount: number;
5 count: number;
6 res: unknown;
7}
8export 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 */
27export declare function toJS(value: any, arg: string | null, ctx?: ToJSContext): any;
Note: See TracBrowser for help on using the repository browser.