You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LDContextCommon type allows invalid contexts. The key field is required unless anonymous is set to true and this can be enforced at the type level. In the case key is not set and anonymous is undefined or false, the error may be missed during testing resulting in targeted features being unavailable.
This type would catch this issue for a multi-kind context:
Describe the bug
The
LDContextCommon
type allows invalid contexts. Thekey
field is required unlessanonymous
is set totrue
and this can be enforced at the type level. In the casekey
is not set andanonymous
isundefined
orfalse
, the error may be missed during testing resulting in targeted features being unavailable.This type would catch this issue for a multi-kind context:
To reproduce
In React:
Expected behavior
I would expect this to be caught by types.
Logs
N/A
SDK version
We're using js-sdk-common 5.2.0 at the moment, but the problem is present in js-sdk-common 5.3.0 as well.
Language version, developer tools
Node 20
OS/platform
macos, but this would happen on any platform.
Additional context
None
The text was updated successfully, but these errors were encountered: