isNotNull()
isNotNull()
const isNotNull = <Type, Payload extends object = object>(
value: Type,
callback: ResultCallback<Type, Payload> = resultCallback,
payload?: Payload
): value is Never<null, Type> =>
callback(typeOf(value) !== 'null' && value !== null, value, payload);Generic type variables
Type
Payloadextendsobject=object
Parameters
value: Type
callback: ResultCallback<Type, Payload>
payload?: Payload
Return type
value is Never<null, Type>
Returns
Example usage
Last updated