Skip to content

API Reference / @gtkx/forms / FieldPathValues

Type Alias: FieldPathValues<TFieldValues, TPath>

FieldPathValues<TFieldValues, TPath> = object & { [K in keyof TPath]: FieldPathValue<TFieldValues, TPath[K] & FieldPath<TFieldValues>> }

Defined in: node_modules/.pnpm/react-hook-form@7.86.0_react@19.2.8/node_modules/react-hook-form/dist/types/path/eager.d.ts:109

Type to evaluate the type which the given paths point to.

Type Parameters

TFieldValues

TFieldValues extends FieldValues

field values which are indexed by the paths

TPath

TPath extends FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[]

paths into the deeply nested field values

Example

FieldPathValues<{foo: {bar: string}}, ['foo', 'foo.bar']>
  = [{bar: string}, string]

Released under the MPL-2.0 License.