Type alias UpdateQueryKnownOnly<T>

UpdateQueryKnownOnly<T>: _UpdateQuery<T, {}>

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

Type Parameters

  • T

Type declaration

    Example

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

    Generated using TypeDoc