source: node_modules/ts-toolbelt/out/Number/Negate.d.ts

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 697 bytes
RevLine 
[d24f17c]1import { IterationOf } from '../Iteration/IterationOf';
2import { Iteration, IterationMap } from '../Iteration/Iteration';
3/**
4 * @hidden
5 */
6export declare type _Negate<N extends Iteration> = IterationMap[N[4]];
7/**
8 * Negate a [[Number]]
9 * @param N to negate
10 * @returns `string | number | boolean`
11 * @example
12 * ```ts
13 * import {N} from 'ts-toolbelt'
14 *
15 * type test0 = N.Negate<'-10'> // '10'
16 * type test1 = N.Negate<'10'> // '-10'
17 * type test2 = N.Negate<'10', 's'> // '-10'
18 * type test3 = N.Negate<'10', 'n'> // -10
19 * type test4 = N.Negate<'-100'> // string
20 * ```
21 */
22export declare type Negate<N extends number> = N extends unknown ? _Negate<IterationOf<N>>[0] : never;
Note: See TracBrowser for help on using the repository browser.