Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

IterationOf

IterationOf<N>: `${N}` extends keyof IterationMap ? IterationMap[`${N}`] : IterationMap["__"]

Transform a number into an Iteration (to use Prev, Next, & Pos)

Type parameters

  • N: number

    to transform

returns

Iteration

example

import {I} from 'ts-toolbelt'

type i = I.IterationOf<0> // ["-1", "1", "0", 0, "0"]

type next = I.Next<i>       // ["0", "2", "1", 1, "+"]
type prev = I.Prev<i>       // ["-2", "0", "-1", -1, "-"]

type nnext = I.Pos<next>    // +1
type nprev = I.Pos<prev>    // -1

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