Open learner00000 opened 2 years ago
You should be reference to the test of passport-local-mongoose. In the index.test-d.ts
, the UserModel
should be extends from PassportLocalModel
, and the Schema
should recognize as PassportLocalSchema
.
Link to passport-local-mongoose test file for your reference:
https://github.com/saintedlama/passport-local-mongoose/blob/main/test/types/index.test-d.ts
This is my
models/users.ts
file:And the following is the
authentication.ts
file that uses theuser.ts
file:I get the following error messages:
The sources of errors are these lines:
I don't know what is the problem and how can I fix it? I tried to search on the internet and find the similar questions and do what the similar questions' answers suggest but none of them worked for me!