UNPKG

lakutata

Version:

An IoC-based universal application framework.

29 lines (25 loc) 821 B
import { FindOneOptions } from './TypeDef.internal.74.js'; import { ObjectLiteral } from './TypeDef.internal.36.js'; /** * Defines a special criteria to find specific entity. */ type MongoFindOneOptions<Entity = any> = Omit<FindOneOptions<Entity>, "where"> & { /** * Simple condition that should be applied to match entities. */ where?: FindOneOptions<Entity>["where"] | ObjectLiteral; }; /** * Defines a special criteria to find specific entities. */ interface MongoFindManyOptions<Entity = any> extends MongoFindOneOptions<Entity> { /** * Offset (paginated) where from entities should be taken. */ skip?: number; /** * Limit (paginated) - max number of entities should be taken. */ take?: number; } export type { MongoFindManyOptions, MongoFindOneOptions };