'Mongoose: Property 'watch' does not exist on type 'Model<guildInterface>'
I want to listen to all changes made in my documents with watch model event.
interface guildInterfaceextends Document {
guildid: string,
guildname: string
}
let guild = mongoose.model<guildInterface>('guilds', GuildSchema);
guild.watch("change", console.log);
guild.watch() is returning a type error Property 'watch' does not exist on type 'Model<guildInterface>'
Mongoose Version: [email protected]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
