insin / get-form-data

Gets form and field data via form.elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type definitions

findlay-hannam opened this issue · comments

It would be nice if there were typescript definitions for this module. I'm currently using a custom definition in my project:

type FormData = Record<string, boolean | string | string[] | File | File[]>
declare module 'get-form-data'; {
  function getFormData(form: React.EventTarget): FormData;
  export default getFormData;
}