YamlCollectionTag
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:68
The yaml node, tag and visitor model, re-exported so a caller can write a
custom tag without taking its own dependency on yaml.
Names are Yaml-prefixed rather than kept as upstream. This package’s index
is a flat export *, so a bare Node, Document, Scalar or Schema
would sit beside YamlParseStream and parseYaml under names that say
nothing about YAML — and Node and Document are DOM globals, which this
package, being portable, is expected to be imported alongside.
Extends
Section titled “Extends”TagBase
Properties
Section titled “Properties”collection
Section titled “collection”collection:
"map"|"seq"
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:72
The source collection type supported by this tag.
createNode?
Section titled “createNode?”
optionalcreateNode?: (schema,value,ctx) =>YamlNode
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:13
An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.
Parameters
Section titled “Parameters”schema
Section titled “schema”unknown
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”TagBase.createNode
default?
Section titled “default?”
optionaldefault?:boolean|"key"
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:21
If true, allows for values to be stringified without
an explicit tag together with test.
If 'key', this only applies if the value is used as a mapping key.
For most cases, it’s unlikely that you’ll actually want to use this,
even if you first think you do.
Inherited from
Section titled “Inherited from”TagBase.default
format?
Section titled “format?”
optionalformat?:string
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:26
If a tag has multiple forms that should be parsed and/or stringified
differently, use format to identify them.
Inherited from
Section titled “Inherited from”TagBase.format
identify?
Section titled “identify?”
optionalidentify?: (value) =>boolean
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:31
Used by YAML.createNode to detect your data type, e.g. using typeof or
instanceof.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TagBase.identify
nodeClass?
Section titled “nodeClass?”
optionalnodeClass?: {(schema?):YamlNode;from?: (schema,obj,ctx) =>YamlNode; }
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:80
The Node child class that implements this tag.
If set, used to select this tag when stringifying.
If the class provides a static from method, then that
will be used if the tag object doesn’t have a createNode method.
Parameters
Section titled “Parameters”schema?
Section titled “schema?”Returns
Section titled “Returns”
optionalfrom?: (schema,obj,ctx) =>YamlNode
Parameters
Section titled “Parameters”schema
Section titled “schema”unknown
Returns
Section titled “Returns”resolve?
Section titled “resolve?”
optionalresolve?: (value,onError,options) =>unknown
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:90
Turns a value into an AST node.
If returning a non-Node value, the output will be wrapped as a Scalar.
Note: this is required if nodeClass is not provided.
Parameters
Section titled “Parameters”Parsed<YamlParsedNode, YamlParsedNode | null> | Parsed<YamlParsedNode>
onError
Section titled “onError”(message) => void
options
Section titled “options”ParseOptions
Returns
Section titled “Returns”unknown
stringify?
Section titled “stringify?”
optionalstringify?:undefined
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:69
tag:
string
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:37
The identifier for your data type, with which its stringified form will be
prefixed. Should either be a !-prefixed local !tag, or a fully qualified
tag:domain,date:foo.
Inherited from
Section titled “Inherited from”TagBase.tag
optionaltest?:undefined
Defined in: node_modules/.store/yaml-npm-2.9.1-d61da744fe/package/dist/schema/types.d.ts:70