Mongodb – No compile time error for Typescript type mismatch
I have a function defined like this: export async function removeUser(deleteUserId: Types.ObjectId) When I mistakenly called this function and pass a Mongoose object's id parameter, which is a string, it triggered a runtime exception further in the code when I…