-
Notifications
You must be signed in to change notification settings - Fork 253
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
Routes with required parameters has no intellisense on parameters #803
Comments
What editor/IDE is that? |
I used VS Code for that demonstration edit: I attempted to use github.dev but I didn't know how to install dependencies, so I switched to VS Code |
I does not work in PHPStorm too |
Weird. It seems like it's only the first required param, if I add another route with several required params as soon as I enter one of them the others are suggested. No clue what's going on here. This might be over my head in terms of the level of TypeScript going on but I'll keep thinking about it. |
@bakerkretzmar do you mind providing that example? I couldn't reproduce it. |
Sorry I didn't explain it very well and I wasn't exactly right. This only happens when there are missing required parameters—as soon as all the required parameters are entered, the other (optional) ones are suggested correctly. With the existing |
Ziggy version
2.4.2
Laravel version
none
Description
As the title says, when a route contains required parameters, intellisense is lost.
This is easily reproduceable within
tests/js/route.test-d.ts
, so there is no relevant information to put in the other fields of this issue.Steps to reproduce
Open
tests/js/route.test-d.ts
On line 25, remove the
comment
parameter and hitCtrl/Cmd + Space
to view suggested intellisense and assert it shows generic stuff instead of actual parameters.On the
posts.comments.show
route declaration (line 11), make thepost
parameter optional by changingrequired
tofalse
.Again on line 25, hit
Ctrl/Cmd + Space
again and assert it suggests the "correct" information about the route parameters.The text was updated successfully, but these errors were encountered: