source: node_modules/yaml/dist/schema/yaml-1.1/set.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 { Pair } from '../../nodes/Pair.js';
2import { Scalar } from '../../nodes/Scalar.js';
3import { ToJSContext } from '../../nodes/toJS.js';
4import { YAMLMap } from '../../nodes/YAMLMap.js';
5import type { Schema } from '../../schema/Schema.js';
6import type { StringifyContext } from '../../stringify/stringify.js';
7import { CreateNodeContext } from '../../util.js';
8import type { CollectionTag } from '../types.js';
9export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null> {
10 static tag: string;
11 constructor(schema?: Schema);
12 add(key: T | Pair<T, Scalar<null> | null> | {
13 key: T;
14 value: Scalar<null> | null;
15 }): void;
16 /**
17 * If `keepPair` is `true`, returns the Pair matching `key`.
18 * Otherwise, returns the value of that Pair's key.
19 */
20 get(key: unknown, keepPair?: boolean): any;
21 set(key: T, value: boolean): void;
22 /** @deprecated Will throw; `value` must be boolean */
23 set(key: T, value: null): void;
24 toJSON(_?: unknown, ctx?: ToJSContext): any;
25 toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
26 static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet<unknown>;
27}
28export declare const set: CollectionTag;
Note: See TracBrowser for help on using the repository browser.