inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.02k stars 405 forks source link

Router methods type issues with wrong use of Exclude #1856

Closed aktasumut34 closed 2 months ago

aktasumut34 commented 2 months ago

In router, get, reload, replace, post, put, patch, delete typed wrong. It uses

Exclude<VisitOptions, FieldsToHide>

instead of

Omit<VisitOptions, FieldsToHide>

This causes behaviours like 'preserveState', 'preserveScroll' is included in reload functions options parameter type.

driesvints commented 2 months ago

Thanks @aktasumut34. Seems you sent in a PR so let's see how it goes.