Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.5.14/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>]