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

x/valibot/src/index.ts>PathKeys

The modular and type safe schema library for validating structural data 🤖
Latest
type alias PathKeys
Re-export
import { type PathKeys } from "https://deno.land/x/valibot@v1.0.0-beta.7/src/index.ts";

Extracts tuples with path keys.

definition: MaybeReadonly<IsAny<TValue> extends true ? never : TValue extends readonly unknown[] ? number extends TValue["length"] ? [number] | [number, ...PathKeys<TValue[number]>] : [TKey in keyof TValue]: TKey extends `${infer TIndex extends number}` ? [TIndex] | [TIndex, ...PathKeys<TValue[TKey]>] : never[keyof TValue & number] : TValue extends Record<string, unknown> ? [TKey in keyof TValue]: [TKey] | [TKey, ...PathKeys<TValue[TKey]>][keyof TValue] : never>