UNPKG

mongo_dottype

Version:

TypeScript types for using dot notation in mongo queries

18 lines (17 loc) 1.54 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Converts into a type with subproperties and subelements of up to 3 levels deep with dot notation * If `arrIndices` is provided, uses all these indices to pick elements of array properties of the given object with dot notation */ /** export type mongoDot_lvl3<T, arrIndices extends number = never> = Expand<FlattenUnion_shallow<obj_defaultDocFields | sublvl0<T, arrIndices> | sublvl1<T, arrIndices> | sublvl2<T, arrIndices> | sublvl3<T, arrIndices>>>; */ /** * Converts into a type with subproperties and subelements of up to 4 levels deep with dot notation * If `arrIndices` is provided, uses all these indices to pick elements of array properties of the given object with dot notation */ /** export type mongoDot_lvl4<T, arrIndices extends number = never> = Expand<FlattenUnion_shallow<obj_defaultDocFields | sublvl0<T, arrIndices> | sublvl1<T, arrIndices> | sublvl2<T, arrIndices> | sublvl3<T, arrIndices> | sublvl4<T, arrIndices>>>; */ /** * Converts into a type with subproperties and subelements of up to 5 levels deep with dot notation * If `arrIndices` is provided, uses all these indices to pick elements of array properties of the given object with dot notation */ /** export type mongoDot_lvl5<T, arrIndices extends number = never> = Expand<FlattenUnion_shallow<obj_defaultDocFields | sublvl0<T, arrIndices> | sublvl1<T, arrIndices> | sublvl2<T, arrIndices> | sublvl3<T, arrIndices> | sublvl4<T, arrIndices> | sublvl5<T, arrIndices>>>; */