Type Alias
FieldPaths
Every dotted field path that names a single field: like FilterPaths, but a path never runs through an array. Sorting, updates, and indexes use these paths, because they treat a path through an array as missing or do not support it.
type FieldPaths<TDocument, TDepth extends readonly unknown[] = []> = TDepth["length"] extends MaxPathDepth
? never
: TDocument extends object
? {
[Key in keyof TDocument & string]:
| Key
| (NonNullable<TDocument[Key]> extends readonly unknown[] | AtomicValue
? never
: NonNullable<TDocument[Key]> extends object
? `${Key}.${FieldPaths<NonNullable<TDocument[Key]>, [...TDepth, unknown]>}`
: never);
}[keyof TDocument & string]
: neverDefined in packages/driver/src/filter.ts:130