codinginflow/MERN-course

await note.remove();

Opened this issue · 3 comments

I had to await note.remove(); to await note.deleteOne();
TSError: ⨯ Unable to compile TypeScript:
src/controllers/blogs.ts:122:18 - error TS2339: Property 'delete' does not exist on type 'Document<unknown, {}, { createdAt: NativeDate; updatedAt: NativeDate; } & { title: string; description?: string | undefined; imageUrl?: string | undefined; }> & Omit<...>'.

122 await note.delete();

Yea, they changed that in the recent versions of Mongoose.

sir, you are great recently I watched your course video on Mern stack its awsome. I cleared my logics after watching your video.you make it simple

sir, you are great recently I watched your course video on Mern stack its awsome. I cleared my logics after watching your video.you make it simple

Pleasure my friend