jasnell / proposal-istypes

TC-39 Proposal for additional is{Type} APIs
201 stars 7 forks source link

Add Function.isAsyncFunction #13

Closed addaleax closed 7 years ago

addaleax commented 7 years ago

(edit: answer to deleted comment)

Yeah, this obviously wouldn’t check whether a function returns a Promise but whether it was declared as async function ….

And btw, I opened this PR because V8 5.5 comes with IsAsyncFunction (which the original list here was based on).

chicoxyzzy commented 7 years ago

sorry just deleted my comment second before you posted an answer. I was wrong. you really can check this statically. my bad :)

jasnell commented 7 years ago

Going a different direction on this. Async function is covered...