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.3k stars 423 forks source link

Type string is not assignable to type never #1778

Closed hamzaelmaghari closed 8 months ago

hamzaelmaghari commented 8 months ago

Version:

👋🌍!

Thanks for this amazing monolith, I'ave noticed in onChange={(e) => setData("example", e.target.value)} a warning thrown by the IDE which says the following.

The first arg of setData: Argument type string is not assignable to parameter type keyof TForm   Type string is not assignable to type never.

The second arg: Argument type string is not assignable to parameter type.

Thanks for investigating on this issue.