Tempo API
    Preparing search index...

    Interface TermPlugin

    Interface for term-driven parsing and resolution.

    interface TermPlugin {
        aliases?: string[] | readonly string[];
        define: (
            this: Tempo,
            keyOnly?: boolean,
            anchor?: any,
            alias?: string,
        ) => string | Range | readonly Range[] | Range[] | null | undefined;
        description?: string;
        groups?: any;
        key: string;
        locale?: Record<string, string | Function>;
        options?: any;
        ranges?: any[] | readonly any[];
        resolve?: (
            this: Tempo,
            anchor?: any,
            alias?: string,
        ) => readonly Range[] | Range[];
        scope?: string;
        version?: string;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any
    Index
    aliases?: string[] | readonly string[]

    Optional secondary alias keys for the term

    define: (
        this: Tempo,
        keyOnly?: boolean,
        anchor?: any,
        alias?: string,
    ) => string | Range | readonly Range[] | Range[] | null | undefined

    Defines the term's value or range

    description?: string

    Human-readable description of the term

    groups?: any

    Grouping information for the term

    key: string

    Unique identifier for the term

    locale?: Record<string, string | Function>

    Locale-specific term translations

    options?: any

    Colocated or runtime configuration options

    ranges?: any[] | readonly any[]

    Array of time ranges this term represents

    resolve?: (
        this: Tempo,
        anchor?: any,
        alias?: string,
    ) => readonly Range[] | Range[]

    Resolves the term to concrete time ranges

    scope?: string

    Scope or category of the term

    version?: string

    Version of the term plugin