ts-lambda-api - v2.5.2
    Preparing search index...

    Interface TagBase

    interface TagBase {
        createNode?: (
            schema: Schema,
            value: unknown,
            ctx: CreateNodeContext,
        ) => Node;
        default?: boolean | "key";
        format?: string;
        identify?: (value: unknown) => boolean;
        tag: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    createNode?: (schema: Schema, value: unknown, ctx: CreateNodeContext) => Node

    An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.

    default?: boolean | "key"

    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.

    format?: string

    If a tag has multiple forms that should be parsed and/or stringified differently, use format to identify them.

    identify?: (value: unknown) => boolean

    Used by YAML.createNode to detect your data type, e.g. using typeof or instanceof.

    tag: string

    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.