From 45da5d4bc18288257173da1ed97d3527f05e2f1d Mon Sep 17 00:00:00 2001 From: Mario Igkiempor <34078619+MariosIgkiempor@users.noreply.github.com> Date: Sun, 26 Jan 2025 13:06:46 +0000 Subject: [PATCH] Fix tsc error on fresh install Typescript treats the `remember: false` as a literal type in the useForm call, which makes `tsc` fail when the checkbox calls `setData` with a boolean. This commit tells `tsc` to treat false as a boolean, which fixes the `tsc` error and makes `npm run build` pass --- stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx b/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx index 10b8a9a2..980a5adf 100644 --- a/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx +++ b/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx @@ -17,7 +17,7 @@ export default function Login({ const { data, setData, post, processing, errors, reset } = useForm({ email: '', password: '', - remember: false, + remember: false as boolean, }); const submit: FormEventHandler = (e) => {