Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/react-hook-form.ts>FieldPathByValue

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
type alias FieldPathByValue
import { type FieldPathByValue } from "https://deno.land/x/netzo@0.4.72/deps/react-hook-form.ts";

Type which eagerly collects all paths through a fieldType that matches a give type

Examples

Example 1

FieldPathByValue<{foo: {bar: number}, baz: number, bar: string}, number>
  = 'foo.bar' | 'baz'

Type Parameters

TFieldValues extends FieldValues
TValue
definition: [Key in FieldPath<TFieldValues>]: FieldPathValue<TFieldValues, Key> extends TValue ? Key : never[FieldPath<TFieldValues>]