Skip to content

Home > @jview/utils > isDefined

isDefined() function

判断变量是否有具体定义,即非null,非undefined

Signature:

typescript
export declare function isDefined(val: unknown): boolean;
export declare function isDefined(val: unknown): boolean;

Parameters

ParameterTypeDescription
valunknown变量值

Returns:

boolean