Skip to content

infer getRouterParam type according to route path #3006

Open
@flapili

Description

Describe the feature

extends getRouterParam arg based on the path of routes to catch errors in case the file was moved via typescript

as example, /api/[foo]/[bar].get.ts would type getRouterParam as getRouterParam('foo' | 'bar'): string

Additional information

  • Would you be willing to help implement this feature?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions