Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.7.0/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, { }>