Replies: 1 comment
-
I'm interested in this as well, hopefully there's a way |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In more complex scenarios, URL paths may come from dynamic sources, e.g. a backend response. In these situations, the data is likely untyped, or loosely typed, where it's unreasonable to keep the external source synchronised with the possible routes.
For example:
A type guard would be able to provide a utility to guarantee that a runtime object satisfies our discrete set of navigation options.
Alternatively, it could throw an error, rather than using the
is
syntax, and return the validToOptions
Beta Was this translation helpful? Give feedback.
All reactions