source: node_modules/yaml/dist/nodes/Pair.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: 1.2 KB
Line 
1import { CreateNodeContext } from '../doc/createNode.js';
2import type { CollectionItem } from '../parse/cst.js';
3import type { Schema } from '../schema/Schema.js';
4import type { StringifyContext } from '../stringify/stringify.js';
5import { addPairToJSMap } from './addPairToJSMap.js';
6import { NODE_TYPE } from './identity.js';
7import type { ToJSContext } from './toJS.js';
8export declare function createPair(key: unknown, value: unknown, ctx: CreateNodeContext): Pair<import("./Node.js").Node, import("./YAMLMap.js").YAMLMap<unknown, unknown> | import("./Scalar.js").Scalar<unknown> | import("./Alias.js").Alias | import("./YAMLSeq.js").YAMLSeq<unknown>>;
9export declare class Pair<K = unknown, V = unknown> {
10 readonly [NODE_TYPE]: symbol;
11 /** Always Node or null when parsed, but can be set to anything. */
12 key: K;
13 /** Always Node or null when parsed, but can be set to anything. */
14 value: V | null;
15 /** The CST token that was composed into this pair. */
16 srcToken?: CollectionItem;
17 constructor(key: K, value?: V | null);
18 clone(schema?: Schema): Pair<K, V>;
19 toJSON(_?: unknown, ctx?: ToJSContext): ReturnType<typeof addPairToJSMap>;
20 toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
21}
Note: See TracBrowser for help on using the repository browser.