I have a variable that contains a function:
let handler: () => Promise<string> = HTTP_REQUEST();
Why am I not able to call .then() on handler?
.then()
handler
Example:
handler.then(...)
You are on the right track. The variable contains a function. Do the following
handler().then(...)
1.4m articles
1.4m replys
5 comments
57.0k users