Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Iteration/IterationOf"

Index

Type aliases

Type aliases

IterationMap

IterationMap: object

Describes a map of number relationships (Generated with "./_Internal/IterationOfGenerator")

IterationOf

IterationOf<N>: IterationOf<N>

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

Type parameters

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

Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.