Skip to content

route() calls with missing required parameters have no IDE suggestions/completions on any parameters #803

@rrmesquita

Description

@rrmesquita

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

  1. Open tests/js/route.test-d.ts

  2. On line 25, remove the comment parameter and hit Ctrl/Cmd + Space to view suggested intellisense and assert it shows generic stuff instead of actual parameters.

Screenshot 2025-01-09 at 13 24 55
  1. On the posts.comments.show route declaration (line 11), make the post parameter optional by changing required to false .

  2. Again on line 25, hit Ctrl/Cmd + Space again and assert it suggests the "correct" information about the route parameters.

Screenshot 2025-01-09 at 13 26 57

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions