Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Length

Length<Fn>: Length<Parameters<Fn>>

Extract arguments' length from a Function

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

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.