Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "components/common"

Index

Type aliases

ExtractFormValue

ExtractFormValue<A>: Extract<NonNullable<A> extends ReadonlyArray<infer X> ? X : NonNullable<A> extends Array<infer Y> ? Y : A, FormValue>

Type parameters

  • A

FieldMetaState

FieldMetaState<FV>: object

Replace any with string for improved type-safety. io-ts error messages are strings, so we can get away with this here.

Type parameters

  • FV

Type declaration

FormData

FormData<I, J>: object

Type parameters

  • I: string

  • J: string

Type declaration

FormValue

FormValue: string

A form value that can survive the DOM round trip. These constitute the leaves in a FormData type.

This type could perhaps be expanded thanks to HTMLInputElement's valueAsNumber (and even valueAsDate maybe), but these aren't easy to get at via final-form so we omit the corresponding types here.

InputType

InputType: NumericInputType | "checkbox" | "color" | "date" | "datetime-local" | "email" | "month" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week"

InputTypeConstraint

InputTypeConstraint<Value>: Value extends number ? object : object

Type parameters

  • Value

Multiple

Multiple<Value>: any[] extends Value ? object : object

Type parameters

  • Value

NumericInputType

NumericInputType: "number" | "range"

ParsedFormData

ParsedFormData<I, J>: object

Type parameters

  • I: string

  • J: string

Type declaration

ParsedFormValue

ParsedFormValue: string | number | boolean | symbol | null | undefined

All JavaScript types except arrays and objects (and void). These constitute the leaves in a ParsedFormData type.

Required

Required<Value>: undefined extends Value ? object : object

Type parameters

  • Value

ValidationErrors

ValidationErrors<PFD>: object & MapToErrorType<PFD>

A strongly typed version of the ValidationErrors type from final-form.

Also doubles as submission errors.

"Submission errors must be in the same shape as the values of the form. You may return a generic error for the whole form (e.g. 'Login Failed') using the special FORM_ERROR string key."

"Validation errors must be in the same shape as the values of the form. You may return a generic error for the whole form using the special FORM_ERROR string key."

see

https://github.com/final-form/final-form#form_error-string

see

https://github.com/final-form/final-form#onsubmit-values-object-form-formapi-callback-errors-object--void--object--promiseobject--void

Type parameters

Generated using TypeDoc