Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines a source of feature flags. This serves as an extensibility point where anyone can implement their own flag source if they desire.

Type parameters

  • KEYS: string

    the union of all possible feature flag keys. E.g. 'useV2ui' | 'useNewPaymentGateway' | ...

  • PROPS: string = string

    the union of all expected props on the user identifier object. E.g. 'organization' | 'email' | ...

Hierarchy

  • IFeatureFlagSource

Implemented by

Index

Methods

  • fetchFlags(userInfo: TIdentifyParams<PROPS>): Partial<Record<KEYS, boolean>> | Promise<Partial<Record<KEYS, boolean>>>
  • Async function that fetches flags from a flag source

    Parameters

    • userInfo: TIdentifyParams<PROPS>

      the props needed to identify a user enough to find the correct flags

    Returns Partial<Record<KEYS, boolean>> | Promise<Partial<Record<KEYS, boolean>>>

  • init(): Promise<void>
  • An initialization function that is called once upon initialization

    Returns Promise<void>

Generated using TypeDoc