Closed cajubelt closed 1 year ago
Hi @cajubelt - thanks for the PR. The userID
is indeed optional though, but only when one or more customIDs
are provided, reason being sometimes you don't have a userID, but do have other IDs like deviceID and etc. The error message and logic is here. We will fix up the docs though, thanks!
If you do not supply a userID getting a dynamic config, you get a runtime error. This should be reflected in the StatsigUser type to enable static type checks for when userID is set to something that might be null or undefined.
This type is also listed as having userID required in the docs