Type
import { Type } from "jsr:@ende/yaml/unstable-parse";interface ยท experimental
interface Type<K extends KindType, D = any>A type definition for a YAML node.
Properties
tag
tag: stringTag to identify the type
kind
kind: KKind of type
predicate
predicate?: (data: unknown) => data is DCast the type. Used to stringify
represent
represent?: RepresentFn<D> | Record<string, RepresentFn<D>>Function to represent data. Used to stringify
defaultStyle
defaultStyle?: StyleVariantDefault style for the type. Used to stringify
resolve
resolve: (data: any) => booleanFunction to test whether data can be resolved by this type. Used to parse
construct
construct: (data: any) => DFunction to construct data from string. Used to parse