Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/node_modules/yaml/dist/nodes/Collection.d.ts>Collection

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
class Collection
extends NodeBase
Abstract
import { Collection } from "https://deno.land/x/windmill@v1.394.6/node_modules/yaml/dist/nodes/Collection.d.ts";

Constructors

new
Collection(type: symbol, schema?: Schema)

Properties

optional
anchor: string

An optional anchor on this node. Used by alias nodes.

optional
flow: boolean

If true, stringify this and all child nodes using flow rather than block styles.

items: unknown[]
schema: Schema | undefined
[NODE_TYPE]: symbol

Methods

abstract
add(value: unknown): void

Adds a value to the collection.

addIn(path: Iterable<unknown>, value: unknown): void

Adds a value to the collection. For !!map and !!omap the value must be a Pair instance or a { key, value } object, which may not have a key that already exists in the map.

Create a copy of this collection.

abstract
delete(key: unknown): boolean

Removes a value from the collection.

deleteIn(path: Iterable<unknown>): boolean

Removes a value from the collection.

abstract
get(key: unknown, keepScalar?: boolean): unknown

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).

getIn(path: Iterable<unknown>, keepScalar?: boolean): unknown

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).

abstract
has(key: unknown): boolean

Checks if the collection includes a value with the key key.

hasAllNullValues(allowScalar?: boolean): boolean
hasIn(path: Iterable<unknown>): boolean

Checks if the collection includes a value with the key key.

abstract
set(key: unknown, value: unknown): void

Sets a value in this collection. For !!set, value needs to be a boolean to add/remove the item from the set.

setIn(path: Iterable<unknown>, value: unknown): void

Sets a value in this collection. For !!set, value needs to be a boolean to add/remove the item from the set.

Static Properties

maxFlowStringSingleLineLength: number