Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

MongoDB object modeling designed to work in an asynchronous environment.
Go to Latest
type alias mongoose.UpdateQueryKnownOnly
import { type mongoose } from "https://deno.land/x/mongoose@7.8.2/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, { }>