I have the following function signature:
public myCustomFunction(): Promise<string> {
// Insert code here
}
I'm interested in returning a rejected promise with error. How can I create one? The promise should be already rejected, I'm not interested in creating a new promise with reject/success handlers.