Determine whether a method is synchronous or asynchronous

前端 未结 3 826
暖寄归人
暖寄归人 2021-02-07 06:13

In node.js, is it possible to determine (using a function) whether a method is synchronous or asynchronous?

I\'d like to write a function that does the following:

<
3条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 06:53

    No, that's impossible. The methods aren't just marked synchronous or asynchronous, they either use callbacks or they don't.

提交回复
热议问题