Lime Web Components API Documentation - v6.24.0
    Preparing search index...

    Interface ContextMetadata<K>Alpha

    Describes a context entry, its id, a label, and an optional description. Supplied at bootstrap when an entry is registered.

    The generic parameter ties id to a known key. So if you pass { id: 'user' }, the registration's fallback must return a User. Passing a different type is a compile error.

    const userContext: ContextMetadata<'user'> = {
    id: 'user',
    label: 'Current user',
    description: 'The user currently authenticated in the session.',
    };
    interface ContextMetadata<K extends keyof ContextMap = keyof ContextMap> {
        description?: string;
        id: K;
        label: string;
    }

    Type Parameters

    Index

    Properties

    Properties

    description?: string

    Longer description for tooltips or help text. Optional.

    id: K

    The context id. Must be a key of ContextMap.

    Plugin-added entries should use namespaced ids (mypkg.foo, pluginx.bar) so two plugins can't accidentally claim the same name. The built-in keys (user, limeobject, action, coworker, limeobjectFormData) are first-party and exempt from this convention.

    label: string

    Human-readable label. Useful for consumers that enumerate registered entries.