I'm encountering the following error message: "error TS2346: Supplied parameters do not match any signature of call target." This occurs when attempting to reject a promise, but I believe the code adheres to the required signatures. Any suggestions on how to resolve this issue?
Interestingly, the code functions properly in a web application. However, I am currently working on compiling it using nativescript.
Here is the snippet of code in question:
login(): Promise<User> {
// Fetch user data here
if (error) {
return (Promise.reject<User>("Error");
} else {
return Promise.resolve(new User());
}
}