Libraries
    Preparing search index...

    Interface TypedTemplate<T>

    A typed message template created via ParseStringSchemaBuilder.

    When passed to a Logger log method, the logger uses template as the messageTemplate (so events with the same shape are grouped in Seq / SigNoz / ClickHouse) and derives the rendered message by interpolating template with the supplied parameters.

    import { s } from '@cleverbrush/schema';

    // Build a reusable typed template once
    const tmpl = s.parseString('Todo #{TodoId} "{Title}" created by {UserId}');

    // All log sites share the same messageTemplate → groupable in the UI
    logger.info(tmpl, { TodoId: 1, Title: 'Buy milk', UserId: 'u-42' });
    interface TypedTemplate<T extends Record<string, unknown>> {
        template?: string;
        serialize(params: T): string;
    }

    Type Parameters

    • T extends Record<string, unknown>
    Index

    Properties

    Methods

    Properties

    template?: string

    The raw {Property} pattern string, used as messageTemplate.

    Methods