Skip to content
On this page

Home > @taiyuuki/utils > is_callable

is_callable() function

判断给定的参数是否是函数

Signature:

typescript
declare function is_callable<T extends Function>(target: any): target is T;
declare function is_callable<T extends Function>(target: any): target is T;

Parameters

ParameterTypeDescription
targetany参数 targetany 类型,这意味着它可以是任何数据类型

Returns:

target is T

返回布尔值

Released under the MIT License.