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
This should be boolean | number | string | null, instead. Or, even better, an OptimizelyVariableType with an exported type definition export type OptimizelyVariableType = boolean | number | string | null; that other code can import and work with as needed.
Benefits
Since the return type for getFeatureVariable isn't unknown, but is very much known, making the typing reflect that would be super useful for folks who are writing their own mocks/clients with typing based on what the documentation claims may be returned.
Risks/Downsides
unknown is incompatible with everything except another unknown, so by updating the return typing to only those types that might actually be returned by the function, there shouldn't be any downsides. Only upsides.