Skip to main content
Module

x/froebel/mod.ts>notNullish

A strictly typed utility library.
Go to Latest
variable notNullish
import { notNullish } from "https://deno.land/x/froebel@v0.22.0/mod.ts";

Checks if value is not nullish. Literal types are narrowed accordingly.

Examples

Example 1

const nums = (...values: (number | undefined)[]): number[] => values.filter(notNullish)

type

<T>(value: T | null | undefined) => value is T