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
Let a switch (XXX.constructor) correctly infer types in case blocks.
Example
c.f. the following snippet (the Router is the Angular Router btw)
In case NavigationError: block it should be clear that event is indeed a NavigationError instance and I would like to get IntelliSense for that.
As NavigationError has an error property (c.f. following image) I would expect to get that shown in the IntelliSense tooltip in the image above -- but I get console.error() only!
The text was updated successfully, but these errors were encountered:
Search Terms
constructor type inference switch case
Suggestion
Let a
switch (XXX.constructor)
correctly infer types incase
blocks.Example
c.f. the following snippet (the
Router
is the Angular Router btw)In
case NavigationError:
block it should be clear thatevent
is indeed aNavigationError
instance and I would like to get IntelliSense for that.As NavigationError has an
error
property (c.f. following image) I would expect to get that shown in the IntelliSense tooltip in the image above -- but I getconsole.error()
only!The text was updated successfully, but these errors were encountered: