Sha256: 77ff2aeb024d9e1679c00705067159c1b98ccac8310987a0bdaf0e38a6ca7333
Contents?: true
Size: 412 Bytes
Versions: 28
Compression:
Stored size: 412 Bytes
Contents
/** Matches any non-empty tuple. @example ``` import type {NonEmptyTuple} from 'type-fest'; const sum = (...numbers: NonEmptyTuple<number>) => numbers.reduce((total, value) => total + value, 0); sum(1, 2, 3); //=> 6 sum(); //=> Error: Expected at least 1 arguments, but got 0. ``` @see {@link RequireAtLeastOne} for objects @category Array */ export type NonEmptyTuple<T = unknown> = readonly [T, ...T[]];
Version data entries
28 entries across 28 versions & 2 rubygems