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 getUserId() function in the BrowserTracker API returns void according to its type signature, even though the function behaves as expected and actually returns the userId.
To Reproduce
To reproduce this issue, you can look at the API definition for BrowserTracker. The getUserId() function is defined as:
getUserId: ()=>void;
Expected behavior
I would expect the getUserId() function's type signature to reflect its actual behavior by specifying a return type of string, like so:
getUserId: ()=>string;
Additional context
While the function itself returns the userId as expected when called, the type signature incorrectly indicates a void return type. This discrepancy could lead to confusion and potential type errors in code that relies on this API.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
getUserId()
function in the BrowserTracker API returnsvoid
according to its type signature, even though the function behaves as expected and actually returns theuserId
.To Reproduce
To reproduce this issue, you can look at the API definition for BrowserTracker. The
getUserId()
function is defined as:Expected behavior
I would expect the
getUserId()
function's type signature to reflect its actual behavior by specifying a return type ofstring
, like so:Additional context
While the function itself returns the
userId
as expected when called, the type signature incorrectly indicates avoid
return type. This discrepancy could lead to confusion and potential type errors in code that relies on this API.The text was updated successfully, but these errors were encountered: