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

Fix `preserveScroll` and `preserveState` types #1882

Closed reinink closed 1 month ago

reinink commented 1 month ago

Right now the PreserveStateOption type (used for the preserveScroll and preserveState options) accepts a generic string — however the only string value that's supported is 'errors', so I've tightened up this type to reflect that.

I've also updated the return type for resolvePreserveOption, which should only ever return a boolean.