• Determines the strongly typed variation of a feature flag for a context, along with information about how it was calculated.

    The reason property of the result will also be included in analytics events, if you are capturing detailed event data for this flag.

    If the flag variation does not have the specified type, defaultValue is returned. The reason will indicate an error of the type WRONG_KIND in this case.

    For more information, see the SDK reference guide.

    Type Parameters

    • T extends unknown

    Parameters

    • key: string

      The unique key of the feature flag.

    • defaultValue: T

      The default value of the flag, to be used if the value is not available from LaunchDarkly.

    Returns LDEvaluationDetailTyped<T>

    The result (as an ).

Generated using TypeDoc