Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Number/Negate"

Index

Type aliases

Type aliases

Negate

Negate<N, fmt>: Format<_Negate<IterationOf<N>>, fmt>

Negate a Number

Type parameters

returns

string | number | boolean

example

import {N} from 'ts-toolbelt'

type test0 = N.Negate<'-10'>     //  '10'
type test1 = N.Negate<'10'>      // '-10'
type test2 = N.Negate<'10', 's'> // '-10'
type test3 = N.Negate<'10', 'n'> //  -10
type test4 = N.Negate<'-100'>    // string

_Negate

_Negate<N>: _Minus<IterationOf<"0">, N>

Type parameters

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