diff options
author | Minteck <contact@minteck.org> | 2022-06-04 08:51:01 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-06-04 08:51:01 +0200 |
commit | 383285ecd5292bf9a825e05904955b937de84cc9 (patch) | |
tree | 0a53b6f02c1604b078044567c03dc1b6c944c8c2 /node_modules/yaml/dist/nodes/YAMLSeq.d.ts | |
download | equestriadb-383285ecd5292bf9a825e05904955b937de84cc9.tar.gz equestriadb-383285ecd5292bf9a825e05904955b937de84cc9.tar.bz2 equestriadb-383285ecd5292bf9a825e05904955b937de84cc9.zip |
Initial commit
Diffstat (limited to 'node_modules/yaml/dist/nodes/YAMLSeq.d.ts')
-rw-r--r-- | node_modules/yaml/dist/nodes/YAMLSeq.d.ts | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/node_modules/yaml/dist/nodes/YAMLSeq.d.ts b/node_modules/yaml/dist/nodes/YAMLSeq.d.ts new file mode 100644 index 0000000..f892a97 --- /dev/null +++ b/node_modules/yaml/dist/nodes/YAMLSeq.d.ts @@ -0,0 +1,55 @@ +import type { BlockSequence, FlowCollection } from '../parse/cst.js'; +import type { Schema } from '../schema/Schema.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import { Collection } from './Collection.js'; +import { ParsedNode, Range } from './Node.js'; +import type { Pair } from './Pair.js'; +import { ToJSContext } from './toJS.js'; +export declare namespace YAMLSeq { + interface Parsed<T extends ParsedNode | Pair<ParsedNode, ParsedNode | null> = ParsedNode> extends YAMLSeq<T> { + items: T[]; + range: Range; + srcToken?: BlockSequence | FlowCollection; + } +} +export declare class YAMLSeq<T = unknown> extends Collection { + static get tagName(): 'tag:yaml.org,2002:seq'; + items: T[]; + constructor(schema?: Schema); + add(value: T): void; + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key: unknown): boolean; + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + get(key: unknown, keepScalar?: boolean): unknown; + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key: unknown): boolean; + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key: unknown, value: T): void; + toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; + toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; +} |