UNPKG

@sevinf/maybe

Version:

Maybe/Optional type implementation in Typescript. Main motivation for creating this library was handling `null` values in deeply nested data, coming from GraphQL APIs, but the library itself is not limited to GraphQL.

3 lines (2 loc) 93 B
import { Maybe } from './maybe'; export declare function compact<T>(items: Maybe<T>[]): T[];