Open victor-optimizely opened 5 months ago
It looks like the underlying definition is in the @optrimizely/sdk
package so I've duplicated this issue there. Since it would still take an update here not sure if you want to keep it open to follow up (I would).
@victor-optimizely, is this ticket still valid?
Is there an existing issue for this?
SDK Version
3.1.0
Current Behavior
The new package has defined the
UserAttributeValue
to be a limited set of types which contradicts the documentation stating it supports any type. What's happening now is that if you have a custom type being set as an attribute you will receive a typescript error because the type is not supported.Expected Behavior
The
user
prop in theOptimizelyProvider
should allow any type definition as stated in the documentation instead of the currently defined type:⬇️
or simply:
⬇️
Steps To Reproduce
user
prop, add a custom attribute that has a json value:Note the TS error:
React Framework
create-react-app
Browsers impacted
No response
Link
No response
Logs
No response
Severity
Blocking development
Workaround/Solution
Solution listed above. Workaround might be to ts-ignore and ensure the attribute is being used.
Recent Change
No response
Conflicts
No response