I am currently trying to add a static method to my mongoose schema but I can\'t find the reason why it doesn\'t work this way.
My model:
import * as
I cannot see your IUser interface however I suspect that you have not included the methods in there. EG
export interface IUser {
email: string,
hash: string,
salt: string,
setPassword(password: string): void,
validPassword(password: string): boolean,
generateJwt(): string
}
typescript will then recognize your methods and stop complaining