Skip to main content
Module

x/typeorm/src/index.ts>MongoRepository#findOne

Forked from https://github.com/typeorm/typeorm
Latest
method MongoRepository.prototype.findOne
Re-export
import { MongoRepository } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Finds first entity that matches given conditions and/or find options.

Parameters

optional
optionsOrConditions:
| string
| number
| Date
| ObjectID
| FindOneOptions<Entity>
| Partial<Entity>
optional
maybeOptions: FindOneOptions<Entity>

Returns

Promise<Entity | undefined>