types.isAsyncFunction - Node documentation
function types.isAsyncFunction

Usage in Deno

import { types } from "node:util";
const { isAsyncFunction } = types;
isAsyncFunction(object: unknown): boolean

Returns true if the value is an async function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.

util.types.isAsyncFunction(function foo() {});  // Returns false
util.types.isAsyncFunction(async function foo() {});  // Returns true

Parameters

object: unknown

Return Type

boolean