import * as React from "react" type InputTypes = | 'text' | 'radio' | 'email' | 'password' | 'search' | 'color' | 'tel' | 'url' | 'submit' | 'date' | 'time' | 'week' | 'month' | 'datetimeLocal' | 'number' | 'range' | 'checkbox' | 'select' interface GeneratedProps { id: N name: N value: F[N] type: T extends "datetimeLocal" ? "datetime-local": T onChange: React.ChangeEventHandler } type GenericObject = { [key: string]: any }; type GeneratePropsFunc = (props: P) => P & R type InputPropGenerator< T, F, N, G = GeneratePropsFunc > = ( name: N, options?: { value: T extends "checkbox" | "select" ? string : never generateProps: G /** Override the name of the form being submitted. */ formName: T extends "submit" ? string : never } ) => GeneratedProps | ReturnType export type InputPropGenerators = { [K in InputTypes]: InputPropGenerator }