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
While creating PR #184 a concern arose wherein the type applied to the auth0Id value in a few places was a string which also happens to accept null and undefined as valid values.
The suggestion at the time was to manually coalesce falsey values to '' using something like this:
auth0Id || ''
Which this will certainly work, I don't believe it's not an ideal habit for us to establish. More specifically, I don't think it's a good use of time to manually enforce a level of type safety that the type checker itself is allowing.
What I propose instead is one or both of the following options:
I'm not expecting any immediate progress on this topic. I think it's wise for us to consider whether or not we want to solve this problem at all, and, if so, how soon we want to solve this problem.
The text was updated successfully, but these errors were encountered:
While creating PR #184 a concern arose wherein the type applied to the
auth0Id
value in a few places was astring
which also happens to acceptnull
andundefined
as valid values.The suggestion at the time was to manually coalesce falsey values to
''
using something like this:Which this will certainly work, I don't believe it's not an ideal habit for us to establish. More specifically, I don't think it's a good use of time to manually enforce a level of type safety that the type checker itself is allowing.
What I propose instead is one or both of the following options:
auth0Id
that adds type-safe validation as well. Here's an article covering one potential approach.I'm not expecting any immediate progress on this topic. I think it's wise for us to consider whether or not we want to solve this problem at all, and, if so, how soon we want to solve this problem.
The text was updated successfully, but these errors were encountered: