This is the client side version of the LDContext type (referred to as LDContextStrict in this module).
The key reason for this distinction is that client side contexts can be anonymous.
An anonymous context is a context that satisfies the following definition:
{ key?: string; anonymous: true; }
NOTE: A context with the anonymous property set to false or is undefinedMUST have a key
property set or it will be rejected by the SDK.
Otherwise, refer to LDContextStrict for more details on how LaunchDarkly contexts work.
Anonymous contexts are acceptable in the client side SDK because the SDK will generate a key for them if they are missing.
The key generation logic is in the ensureKey function.
This is the client side version of the
LDContexttype (referred to as LDContextStrict in this module). The key reason for this distinction is that client side contexts can be anonymous. An anonymous context is a context that satisfies the following definition:Otherwise, refer to LDContextStrict for more details on how LaunchDarkly contexts work.