-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: only allow leaf nodes as to
suggestions
#1495
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 9ad1791. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
f2220b6
to
3432501
Compare
to
suggestionsto
suggestions
? [TRoute] extends [never] | ||
? TFail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really necessary?
I removed it, and type tests still work (and it reduces instantiations from 573059 to 572245)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right atm and thats because we're not strictly checking from
. But this first checks if the route exists at all and if it does not then fail.
3432501
to
9ad1791
Compare
Before:
After:
|
I have some routes like the following:
After this change, I cannot do this:
Because TS is complaining, and it says that |
You need to define an index route at |
@chorobin @schiller-manuel
where i have a:
If i refactor my route tree to something like I've tried to open the location masking example in codesandbox and typescripts complain for using <Link to={'/photos'} now |
RouteLeaves
type to only autocomplete leavesCheckPath
as well (yuck, I can't think of a better way)