Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NonNullableLDEvaluationReason

Describes the reason that a flag evaluation produced a particular value. This is part of the LDEvaluationDetail object returned by LDElectronMainClient.variationDetail or LDElectronRendererClient.variationDetail.

This type is separate from <a href="../index.html#ldevaluationreason">LDEvaluationReason</a> for backwards compatibility. In earlier versions of this SDK, <a href="../index.html#ldevaluationreason">LDEvaluationReason</a> was incorrectly defined as being non-nullable.

Hierarchy

  • NonNullableLDEvaluationReason

Index

Properties

Optional errorKind

errorKind: undefined | string

A further description of the error condition, if the kind was 'ERROR'.

kind

kind: string

The general category of the reason:

  • 'OFF': The flag was off and therefore returned its configured off value.
  • 'FALLTHROUGH': The flag was on but the user did not match any targets or rules.
  • 'TARGET_MATCH': The user key was specifically targeted for this flag.
  • 'RULE_MATCH': the user matched one of the flag's rules.
  • 'PREREQUISITE_FAILED': The flag was considered off because it had at least one prerequisite flag that either was off or did not return the desired variation.
  • 'ERROR': The flag could not be evaluated, e.g. because it does not exist or due to an unexpected error.

Optional prerequisiteKey

prerequisiteKey: undefined | string

The key of the failed prerequisite flag, if the kind was 'PREREQUISITE_FAILED'.

Optional ruleId

ruleId: undefined | string

The unique identifier of the matched rule, if the kind was 'RULE_MATCH'.

Optional ruleIndex

ruleIndex: undefined | number

The index of the matched rule (0 for the first), if the kind was 'RULE_MATCH'.

Generated using TypeDoc