Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Range

Range<From, To, way>: From extends unknown ? To extends unknown ? _Range<From, To, way> : never : never

Create a range of * *number**s

Type parameters

  • From: number

    to start with

  • To: number

    to end with

  • way: Way

    (?='->') to reverse it

returns

string[] | number[] | boolean[]

example

import {N} from 'ts-toolbelt'

type test0 = N.Range<'-2', '1'>            // ['-2', '-1', '0', '1']
type test1 = N.Range<'-2', '1', '->'>      // ['-2', '-1', '0', '1']
type test2 = N.Range<'-2', '1', '<-'>      // ['1', '0', '-1', '-2']

  • 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.