Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Negate

Negate<N>: N extends unknown ? _Negate<IterationOf<N>>[0] : never

Negate a [[Number]]

Type parameters

  • N: number

    to negate

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

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