isNotNil
Import from @varavel/vdl-plugin-sdk/utils/predicates.
Checks if the given value is not null nor undefined.
The main use of this function is to be used with TypeScript as a type predicate.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of value. |
Parameters
| Parameter | Type | Description |
|---|---|---|
x |
T | null | undefined |
The value to test if it is not null nor undefined. |
Returns
x is T
True if the value is not null nor undefined, false otherwise.