Skip to content

Conversation

istiak-tridip
Copy link
Contributor

This PR introduces and exports three new utility types:

  • RouteDefinition
  • RouteFormDefinition
  • RouteQueryOptions

Why?

  • Enhanced DX: Allows end-users to import and utilize these types in their projects for better type safety, autocompletion, and easier integration.

    import type { RouteDefinition } from '@/wayfinder';
    
    function sendRequest(route: RouteDefinition<'post'>) { /* ... */ }
    
    sendRequest(StorePostController());
  • Cleaner Generated Code: The generated code now uses these shared types, improving the output's readability.

Thanks 🙏

@joetannenbaum
Copy link
Collaborator

I dig it, thanks!

@joetannenbaum joetannenbaum merged commit 401d643 into laravel:main May 21, 2025
6 checks passed
@istiak-tridip istiak-tridip deleted the feat/export-types branch May 21, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants