Index
Type aliases
Type aliases
Length
Type parameters
param
to extract from
returns
string
or number
example
import {F} from 'ts-toolbelt'
const fn = (a1: any, a2: any) => {}
type test0 = F.LengthOf<typeof fn> // 2
type test1 = F.LengthOf<(a1?: any) => any> // 0 | 1
type test2 = F.LengthOf<(...a: any[]) => any> // number
Extract arguments' length from a
Function