Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/mongoose/types/index.d.ts>mongoose.UpdateQueryKnownOnly

MongoDB object modeling designed to work in an asynchronous environment.
Latest
type alias mongoose.UpdateQueryKnownOnly
import { type mongoose } from "https://deno.land/x/mongoose@8.6.4/types/index.d.ts";
const { UpdateQueryKnownOnly } = mongoose;

A more strict form of UpdateQuery that enforces updating only known top-level properties.

Examples

Example 1

function updateUser(_id: mongoose.Types.ObjectId, update: UpdateQueryKnownOnly<IUser>) {
  return User.updateOne({ _id }, update);
}
definition: _UpdateQuery<T, { }>