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
On DefinitelyTyped there is a lint rule to guard against this, and I would not recommend adding this as it hides an unsafe cast. There is nothing at all that guarantees that active be a boolean, or even exist, at runtime.
If you want to do this in your code, you can always do queryString.parse('...') as Some, which shows that you are casting. Adding a type parameter for this really only hides the as Some part, and makes it easier to miss the unsafety here...
It's the same with JSON.parse, it doesn't take a type parameter.
So, want to used parse function by generic
And the IDE can suggest the query object's properties.
The text was updated successfully, but these errors were encountered: