@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface TemplateBlockProvider

    Runtime and validation contract for a named XML template block.

    interface TemplateBlockProvider {
        contentModel: TemplateBlockContentModel;
        name: string;
        optionalAttributes?: readonly string[];
        requiredAttributes?: readonly string[];
        expand(
            block: TemplateBlockNode,
            context: TemplateBlockExpansionContext,
        ): string;
    }
    Index

    Properties

    Whether this block is self-closing, a container, or accepts either shape.

    name: string

    XML tag name handled by this provider.

    optionalAttributes?: readonly string[]

    Optional XML attribute names. When omitted, any extra attributes are accepted.

    requiredAttributes?: readonly string[]

    Required XML attribute names.

    Methods