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

    Interface SequenceTagOptions<Carrier, Result>

    Options for defineSequenceTag.

    interface SequenceTagOptions<Carrier, 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;
    }

    Type Parameters

    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.