Setu-TS
    Preparing search index...

    Interface FlagContext

    Evaluation context for targeting rules.

    0.1.0

    interface FlagContext {
        attributes?: Readonly<Record<string, string | number | boolean>>;
        tenantId?: string;
        userId?: string;
    }
    Index
    attributes?: Readonly<Record<string, string | number | boolean>>

    Additional targeting attributes.

    The built-in evaluation path accepts these but does not read them — only userId participates in allowlist and percentage targeting. They are carried through for a custom provider that implements its own targeting rules.

    tenantId?: string

    The tenant the flag is evaluated for, when the request resolves one.

    A flag scoped with tenants (see the feature-flags plugin's FlagDefinition) is false for a context whose tenantId is not in that list — and false when no tenant is resolved at all. Optional, so every existing caller and implementor is source-compatible: a context without a tenantId only matters against a flag that scopes itself.

    0.2.0

    userId?: string

    The user the flag is evaluated for.