import { getFormData , Event , FormData } from './getFormData' ; export function handleSubmit < T extends FormData > ( fn ) { return function submit ( event ) { event . preventDefault ( ) ; const values = getFormData < T > ( event ) ; return fn ( values ) ?? false ; } ; }