Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
23 lines
612 B
Plaintext
23 lines
612 B
Plaintext
/**
|
|
* Check if value is an async function
|
|
*
|
|
* 校验是否为函数
|
|
*
|
|
* @example
|
|
* ```js
|
|
* import { isAsyncFunction } from 'is-what-type';
|
|
*
|
|
* isFunction(async () => { }); // true
|
|
* isFunction(() => { }); // true
|
|
* isFunction(function() { }); // true
|
|
* isFunction(async function() { }); // true
|
|
* isFunction(123); // false
|
|
* isFunction('string'); // false
|
|
* isFunction({}); // false
|
|
* ```
|
|
*
|
|
* @param value - The value to check
|
|
* @returns `true` if `value` is an async function, `false` otherwise
|
|
*/
|
|
export declare function isFunction<T = (...args: any[]) => any>(value: unknown): value is T;
|