Can someone help me with this issue?
Error Message: ERROR TypeError: answerID.equals is not a function
I am unsure why I am getting this error.
Here is the code snippet:
import { ObjectId } from 'bson';
export class Person{
personID: ObjectId;
constructor(personID: ObjectId){
if(personID.equals("12345"){
this.personID = personID;
}
}
}
All methods from the import are not functioning correctly. I have installed it but still facing issues. Any help is appreciated.