UNPKG

1.19 kBTypeScriptView Raw
1import { ToJSContext } from '../../nodes/toJS.js';
2import { YAMLSeq } from '../../nodes/YAMLSeq.js';
3import { CreateNodeContext } from '../../util.js';
4import type { Schema } from '../Schema.js';
5import { CollectionTag } from '../types.js';
6export declare class YAMLOMap extends YAMLSeq {
7 static tag: string;
8 constructor();
9 add: (pair: import("../../index.js").Pair<any, any> | {
10 key: any;
11 value: any;
12 }, overwrite?: boolean | undefined) => void;
13 delete: (key: unknown) => boolean;
14 get: {
15 (key: unknown, keepScalar: true): import("../../index.js").Scalar<any> | undefined;
16 (key: unknown, keepScalar?: false | undefined): any;
17 (key: unknown, keepScalar?: boolean | undefined): any;
18 };
19 has: (key: unknown) => boolean;
20 set: (key: any, value: any) => void;
21 /**
22 * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
23 * but TypeScript won't allow widening the signature of a child method.
24 */
25 toJSON(_?: unknown, ctx?: ToJSContext): unknown[];
26 static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLOMap;
27}
28export declare const omap: CollectionTag;