Skip to main content
Version: v10.0.0

FieldPath

Paths to the fields of a document, nested objects included (up to 4 levels), joined with Separator : . for Firestore field paths, / for Realtime Database child paths. The __key id added by the adapter is not a field.


Import
import { FieldPath } from "@hyper-fetch/firebase-admin"

Preview​

type FieldPath<Doc,Separator,Depth> = IsAny<Doc> extends true ? string : [Depth] extends [never] ? never : Doc extends Primitive | readonly any[] ? never : { [ Key in Exclude<keyof Doc, __key> & string]: NonNullable<Doc[Key]> extends Primitive | readonly any[] ? Key : Key | void }[Exclude<keyof Doc, __key> & string];