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:
876 bytes
|
Line | |
---|
1 | import { Equals } from '../Any/Equals';
|
---|
2 | import { _Greater } from './Greater';
|
---|
3 | import { IterationOf } from '../Iteration/IterationOf';
|
---|
4 | import { Iteration } from '../Iteration/Iteration';
|
---|
5 | import { Or } from '../Boolean/Or';
|
---|
6 | /**
|
---|
7 | * @hidden
|
---|
8 | */
|
---|
9 | export declare type _GreaterEq<N1 extends Iteration, N2 extends Iteration> = Or<Equals<N1, N2>, _Greater<N1, N2>>;
|
---|
10 | /**
|
---|
11 | * Check if a [[Number]] is greater or equal to another one
|
---|
12 | * @param N1 to compare
|
---|
13 | * @param N2 to compare to
|
---|
14 | * @returns [[Boolean]]
|
---|
15 | * @example
|
---|
16 | * ```ts
|
---|
17 | * import {N} from 'ts-toolbelt'
|
---|
18 | *
|
---|
19 | * type test0 = N.GreaterEq<'7', '5'> // True
|
---|
20 | * type test1 = N.GreaterEq<'5', '5'> // True
|
---|
21 | * type test2 = N.GreaterEq<'5', '7'> // False
|
---|
22 | * ```
|
---|
23 | */
|
---|
24 | export declare type GreaterEq<N1 extends number, N2 extends number> = N1 extends unknown ? N2 extends unknown ? _GreaterEq<IterationOf<N1>, IterationOf<N2>> : never : never;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.