js-yaml - v5.3.0
    Preparing search index...

    Interface SequenceTagDefinition<Carrier, Result>

    Normalized sequence tag returned by defineSequenceTag.

    interface SequenceTagDefinition<Carrier = unknown, Result = Carrier> {
        matchByTagPrefix: boolean;
        create: (tagName: string) => Carrier;
        addItem: (carrier: Carrier, item: unknown, index: number) => string | void;
        finalize: (carrier: Carrier) => Result;
        identify: (data: any) => boolean;
        represent: (data: any) => ArrayLike<unknown>;
        representTagName: (data: any) => string;
        tagName: string;
        nodeKind: "sequence";
        implicit: false;
        carrierIsResult: boolean;
    }

    Type Parameters

    • Carrier = unknown
    • Result = Carrier

    Hierarchy

    Index

    Whether explicit tag names are matched by prefix instead of exact equality. Default: false.

    Create the carrier used while constructing a sequence.

    Add an item to the carrier. Return a non-empty error message to reject it.

    Convert the completed carrier to the result. Defaults to the identity function.

    Selects this tag for a JavaScript value when dumping. Use () => false for load-only tags.

    Return the array-like contents to dump. Defaults to the identity function.

    Return the tag name to emit for a prefix-matching tag. Defaults to tagName.

    Tag name used for schema lookup.

    YAML node kind handled by this tag.

    Sequence tags do not participate in implicit scalar resolution.

    Whether the carrier is also the final result (finalize was omitted).