Skip to content

Commit c40f7fc

Browse files
Fix tsc error on fresh install (#457)
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
1 parent 3aa5d34 commit c40f7fc

File tree

1 file changed

+1
-1
lines changed
  • stubs/inertia-react-ts/resources/js/Pages/Auth

1 file changed

+1
-1
lines changed

stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Login({
1717
const { data, setData, post, processing, errors, reset } = useForm({
1818
email: '',
1919
password: '',
20-
remember: false,
20+
remember: false as boolean,
2121
});
2222

2323
const submit: FormEventHandler = (e) => {

0 commit comments

Comments
 (0)