type-plus 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -12
- package/cjs/any_plus/any.d.ts +29 -0
- package/cjs/any_plus/any.d.ts.map +1 -0
- package/cjs/{predicates/IsAny.js → any_plus/any.js} +1 -1
- package/cjs/any_plus/any.js.map +1 -0
- package/cjs/any_plus/index.d.ts +2 -0
- package/cjs/any_plus/index.d.ts.map +1 -0
- package/cjs/{array_plus/_plus.js → any_plus/index.js} +1 -1
- package/cjs/any_plus/index.js.map +1 -0
- package/cjs/array_plus/array.d.ts +16 -5
- package/cjs/array_plus/array.d.ts.map +1 -1
- package/cjs/array_plus/array_number.d.ts +4 -0
- package/cjs/array_plus/array_number.d.ts.map +1 -0
- package/cjs/{number_plus/_plus.js → array_plus/array_number.js} +1 -1
- package/cjs/array_plus/array_number.js.map +1 -0
- package/cjs/array_plus/array_plus.d.ts +35 -0
- package/cjs/array_plus/array_plus.d.ts.map +1 -0
- package/cjs/{math/IsPositive.js → array_plus/array_plus.js} +1 -1
- package/cjs/array_plus/array_plus.js.map +1 -0
- package/cjs/array_plus/create_tuple.d.ts +3 -2
- package/cjs/array_plus/create_tuple.d.ts.map +1 -1
- package/cjs/array_plus/index.d.ts +15 -15
- package/cjs/array_plus/index.d.ts.map +1 -1
- package/cjs/array_plus/pad_left.d.ts +4 -3
- package/cjs/array_plus/pad_left.d.ts.map +1 -1
- package/cjs/array_plus/tail.d.ts +1 -1
- package/cjs/array_plus/tail.d.ts.map +1 -1
- package/cjs/assertion/assertType.d.ts +1 -1
- package/cjs/assertion/assertType.d.ts.map +1 -1
- package/cjs/assertion/assertType.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +6 -5
- package/cjs/index.js.map +1 -1
- package/cjs/math/Add.d.ts +1 -2
- package/cjs/math/Add.d.ts.map +1 -1
- package/cjs/math/Digit.d.ts +1 -2
- package/cjs/math/Digit.d.ts.map +1 -1
- package/cjs/math/GreaterThan.d.ts +1 -2
- package/cjs/math/GreaterThan.d.ts.map +1 -1
- package/cjs/math/Max.d.ts +1 -1
- package/cjs/math/Max.d.ts.map +1 -1
- package/cjs/math/Subtract.d.ts +1 -2
- package/cjs/math/Subtract.d.ts.map +1 -1
- package/cjs/math/index.d.ts +0 -2
- package/cjs/math/index.d.ts.map +1 -1
- package/cjs/number_plus/number.d.ts +79 -2
- package/cjs/number_plus/number.d.ts.map +1 -1
- package/cjs/number_plus/number_plus.d.ts +2 -0
- package/cjs/number_plus/number_plus.d.ts.map +1 -0
- package/cjs/{math/IsWhole.js → number_plus/number_plus.js} +1 -1
- package/cjs/number_plus/number_plus.js.map +1 -0
- package/cjs/object/IsDisjoint.d.ts +2 -2
- package/cjs/object/IsDisjoint.d.ts.map +1 -1
- package/cjs/object/KeysWithDiffType.d.ts +1 -1
- package/cjs/object/KeysWithDiffType.d.ts.map +1 -1
- package/cjs/object/KnownKeys.d.ts +1 -1
- package/cjs/object/KnownKeys.d.ts.map +1 -1
- package/cjs/object/OptionalKeys.d.ts +1 -1
- package/cjs/object/OptionalKeys.d.ts.map +1 -1
- package/cjs/object/Partial.d.ts +3 -3
- package/cjs/object/Partial.d.ts.map +1 -1
- package/cjs/object/getField.d.ts +1 -1
- package/cjs/object/getField.d.ts.map +1 -1
- package/cjs/object/mapKey.d.ts +1 -1
- package/cjs/object/mapKey.d.ts.map +1 -1
- package/cjs/object/mapProperties.d.ts +1 -1
- package/cjs/object/mapProperties.d.ts.map +1 -1
- package/cjs/object/omit.d.ts +3 -3
- package/cjs/object/omit.d.ts.map +1 -1
- package/cjs/object/omit.js +2 -2
- package/cjs/object/omit.js.map +1 -1
- package/cjs/object/pick.d.ts +1 -1
- package/cjs/object/pick.d.ts.map +1 -1
- package/cjs/predicates/Equal.d.ts +1 -1
- package/cjs/predicates/Equal.d.ts.map +1 -1
- package/cjs/predicates/index.d.ts +0 -1
- package/cjs/predicates/index.d.ts.map +1 -1
- package/cjs/predicates/index.js.map +1 -1
- package/cjs/promise/PromiseValueMerge.d.ts +1 -2
- package/cjs/promise/PromiseValueMerge.d.ts.map +1 -1
- package/esm/any_plus/any.d.ts +29 -0
- package/esm/any_plus/any.d.ts.map +1 -0
- package/esm/any_plus/any.js +2 -0
- package/esm/any_plus/any.js.map +1 -0
- package/esm/any_plus/index.d.ts +2 -0
- package/esm/any_plus/index.d.ts.map +1 -0
- package/esm/any_plus/index.js +2 -0
- package/esm/any_plus/index.js.map +1 -0
- package/esm/array_plus/array.d.ts +16 -5
- package/esm/array_plus/array.d.ts.map +1 -1
- package/esm/array_plus/array_number.d.ts +4 -0
- package/esm/array_plus/array_number.d.ts.map +1 -0
- package/esm/array_plus/array_number.js +2 -0
- package/esm/array_plus/array_number.js.map +1 -0
- package/esm/array_plus/array_plus.d.ts +35 -0
- package/esm/array_plus/array_plus.d.ts.map +1 -0
- package/esm/array_plus/array_plus.js +2 -0
- package/esm/array_plus/array_plus.js.map +1 -0
- package/esm/array_plus/create_tuple.d.ts +3 -2
- package/esm/array_plus/create_tuple.d.ts.map +1 -1
- package/esm/array_plus/index.d.ts +15 -15
- package/esm/array_plus/index.d.ts.map +1 -1
- package/esm/array_plus/pad_left.d.ts +4 -3
- package/esm/array_plus/pad_left.d.ts.map +1 -1
- package/esm/array_plus/tail.d.ts +1 -1
- package/esm/array_plus/tail.d.ts.map +1 -1
- package/esm/assertion/assertType.d.ts +1 -1
- package/esm/assertion/assertType.d.ts.map +1 -1
- package/esm/assertion/assertType.js.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/math/Add.d.ts +1 -2
- package/esm/math/Add.d.ts.map +1 -1
- package/esm/math/Digit.d.ts +1 -2
- package/esm/math/Digit.d.ts.map +1 -1
- package/esm/math/GreaterThan.d.ts +1 -2
- package/esm/math/GreaterThan.d.ts.map +1 -1
- package/esm/math/Max.d.ts +1 -1
- package/esm/math/Max.d.ts.map +1 -1
- package/esm/math/Subtract.d.ts +1 -2
- package/esm/math/Subtract.d.ts.map +1 -1
- package/esm/math/index.d.ts +0 -2
- package/esm/math/index.d.ts.map +1 -1
- package/esm/number_plus/number.d.ts +79 -2
- package/esm/number_plus/number.d.ts.map +1 -1
- package/esm/number_plus/number_plus.d.ts +2 -0
- package/esm/number_plus/number_plus.d.ts.map +1 -0
- package/esm/number_plus/number_plus.js +2 -0
- package/esm/number_plus/number_plus.js.map +1 -0
- package/esm/object/IsDisjoint.d.ts +2 -2
- package/esm/object/IsDisjoint.d.ts.map +1 -1
- package/esm/object/KeysWithDiffType.d.ts +1 -1
- package/esm/object/KeysWithDiffType.d.ts.map +1 -1
- package/esm/object/KnownKeys.d.ts +1 -1
- package/esm/object/KnownKeys.d.ts.map +1 -1
- package/esm/object/OptionalKeys.d.ts +1 -1
- package/esm/object/OptionalKeys.d.ts.map +1 -1
- package/esm/object/Partial.d.ts +3 -3
- package/esm/object/Partial.d.ts.map +1 -1
- package/esm/object/getField.d.ts +1 -1
- package/esm/object/getField.d.ts.map +1 -1
- package/esm/object/mapKey.d.ts +1 -1
- package/esm/object/mapKey.d.ts.map +1 -1
- package/esm/object/mapProperties.d.ts +1 -1
- package/esm/object/mapProperties.d.ts.map +1 -1
- package/esm/object/omit.d.ts +3 -3
- package/esm/object/omit.d.ts.map +1 -1
- package/esm/object/omit.js +1 -1
- package/esm/object/omit.js.map +1 -1
- package/esm/object/pick.d.ts +1 -1
- package/esm/object/pick.d.ts.map +1 -1
- package/esm/predicates/Equal.d.ts +1 -1
- package/esm/predicates/Equal.d.ts.map +1 -1
- package/esm/predicates/index.d.ts +0 -1
- package/esm/predicates/index.d.ts.map +1 -1
- package/esm/predicates/index.js.map +1 -1
- package/esm/promise/PromiseValueMerge.d.ts +1 -2
- package/esm/promise/PromiseValueMerge.d.ts.map +1 -1
- package/package.json +3 -3
- package/ts/any_plus/any.ts +29 -0
- package/ts/any_plus/index.ts +1 -0
- package/ts/array_plus/array.ts +21 -11
- package/ts/array_plus/array_number.ts +12 -0
- package/ts/array_plus/array_plus.ts +66 -0
- package/ts/array_plus/create_tuple.ts +3 -2
- package/ts/array_plus/index.ts +15 -15
- package/ts/array_plus/pad_left.ts +4 -3
- package/ts/array_plus/tail.ts +1 -1
- package/ts/assertion/assertType.ts +1 -1
- package/ts/index.ts +4 -15
- package/ts/math/Add.ts +1 -3
- package/ts/math/Digit.ts +1 -2
- package/ts/math/GreaterThan.ts +1 -2
- package/ts/math/Max.ts +1 -1
- package/ts/math/Subtract.ts +1 -2
- package/ts/math/index.ts +0 -2
- package/ts/number_plus/number.ts +97 -6
- package/ts/object/IsDisjoint.ts +2 -2
- package/ts/object/KeysWithDiffType.ts +1 -1
- package/ts/object/KnownKeys.ts +1 -1
- package/ts/object/OptionalKeys.ts +1 -1
- package/ts/object/Partial.ts +3 -3
- package/ts/object/getField.ts +1 -1
- package/ts/object/mapKey.ts +1 -1
- package/ts/object/mapProperties.ts +1 -1
- package/ts/object/omit.ts +4 -3
- package/ts/object/pick.ts +1 -1
- package/ts/predicates/Equal.ts +1 -1
- package/ts/predicates/index.ts +0 -1
- package/ts/promise/PromiseValueMerge.ts +9 -11
- package/cjs/array_plus/_plus.d.ts +0 -2
- package/cjs/array_plus/_plus.d.ts.map +0 -1
- package/cjs/array_plus/_plus.js.map +0 -1
- package/cjs/math/IsPositive.d.ts +0 -7
- package/cjs/math/IsPositive.d.ts.map +0 -1
- package/cjs/math/IsPositive.js.map +0 -1
- package/cjs/math/IsWhole.d.ts +0 -7
- package/cjs/math/IsWhole.d.ts.map +0 -1
- package/cjs/math/IsWhole.js.map +0 -1
- package/cjs/number_plus/_plus.d.ts +0 -2
- package/cjs/number_plus/_plus.d.ts.map +0 -1
- package/cjs/number_plus/_plus.js.map +0 -1
- package/cjs/predicates/IsAny.d.ts +0 -3
- package/cjs/predicates/IsAny.d.ts.map +0 -1
- package/cjs/predicates/IsAny.js.map +0 -1
- package/esm/array_plus/_plus.d.ts +0 -2
- package/esm/array_plus/_plus.d.ts.map +0 -1
- package/esm/array_plus/_plus.js +0 -2
- package/esm/array_plus/_plus.js.map +0 -1
- package/esm/math/IsPositive.d.ts +0 -7
- package/esm/math/IsPositive.d.ts.map +0 -1
- package/esm/math/IsPositive.js +0 -2
- package/esm/math/IsPositive.js.map +0 -1
- package/esm/math/IsWhole.d.ts +0 -7
- package/esm/math/IsWhole.d.ts.map +0 -1
- package/esm/math/IsWhole.js +0 -2
- package/esm/math/IsWhole.js.map +0 -1
- package/esm/number_plus/_plus.d.ts +0 -2
- package/esm/number_plus/_plus.d.ts.map +0 -1
- package/esm/number_plus/_plus.js +0 -2
- package/esm/number_plus/_plus.js.map +0 -1
- package/esm/predicates/IsAny.d.ts +0 -3
- package/esm/predicates/IsAny.d.ts.map +0 -1
- package/esm/predicates/IsAny.js +0 -2
- package/esm/predicates/IsAny.js.map +0 -1
- package/ts/array_plus/_plus.ts +0 -1
- package/ts/math/IsPositive.ts +0 -10
- package/ts/math/IsWhole.ts +0 -10
- package/ts/predicates/IsAny.ts +0 -3
- /package/ts/number_plus/{_plus.ts → number_plus.ts} +0 -0
package/ts/number_plus/number.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { IsNever } from '../PrimitiveTypes.js'
|
|
2
|
+
import type { IsAny } from '../any_plus/any.js'
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Either number or bigint.
|
|
3
6
|
*/
|
|
@@ -16,12 +19,48 @@ export type Zero = 0 | 0n
|
|
|
16
19
|
*
|
|
17
20
|
* type R = Integer<0> // 0
|
|
18
21
|
* type R = Integer<1.1> // never
|
|
22
|
+
* type R = Integer<number> // never as it contains non-integer
|
|
19
23
|
*
|
|
20
24
|
* type R = Integer<0, true, false> // true
|
|
21
25
|
* type R = Integer<1.1, true, false> // false
|
|
22
26
|
* ```
|
|
23
27
|
*/
|
|
24
|
-
export type Integer<N extends Numeric, Then = N, Else = never> =
|
|
28
|
+
export type Integer<N extends Numeric, Then = N, Else = never> = IsNever<
|
|
29
|
+
N,
|
|
30
|
+
Else,
|
|
31
|
+
`${N}` extends `${bigint}` ? Then : Else
|
|
32
|
+
>
|
|
33
|
+
/**
|
|
34
|
+
* Check if the value is an integer.
|
|
35
|
+
*
|
|
36
|
+
* ```
|
|
37
|
+
* import type { IsInteger } from 'type-plus'
|
|
38
|
+
*
|
|
39
|
+
* type R = IsInteger<0> // 0
|
|
40
|
+
* type R = IsInteger<1.1> // never
|
|
41
|
+
* type R = IsInteger<number> // never as it contains non-integer
|
|
42
|
+
*
|
|
43
|
+
* type R = IsInteger<0, true, false> // true
|
|
44
|
+
* type R = IsInteger<1.1, true, false> // false
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export type IsInteger<N extends Numeric, Then = true, Else = false> = Integer<N, Then, Else>
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if the value is an integer.
|
|
51
|
+
*
|
|
52
|
+
* ```
|
|
53
|
+
* import type { IsWhole } from 'type-plus'
|
|
54
|
+
*
|
|
55
|
+
* type R = IsWhole<0> // 0
|
|
56
|
+
* type R = IsWhole<1.1> // never
|
|
57
|
+
* type R = IsWhole<number> // never as it contains non-integer
|
|
58
|
+
*
|
|
59
|
+
* type R = IsWhole<0, true, false> // true
|
|
60
|
+
* type R = IsWhole<1.1, true, false> // false
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export type IsWhole<N extends Numeric, Then = true, Else = false> = Integer<N, Then, Else>
|
|
25
64
|
|
|
26
65
|
/**
|
|
27
66
|
* Check if the value is a negative number.
|
|
@@ -36,11 +75,11 @@ export type Integer<N extends Numeric, Then = N, Else = never> = `${N}` extends
|
|
|
36
75
|
* type R = Negative<1, true, false> // false
|
|
37
76
|
* ```
|
|
38
77
|
*/
|
|
39
|
-
export type Negative<N extends Numeric, Then = N, Else = never> =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
? Then
|
|
43
|
-
|
|
78
|
+
export type Negative<N extends Numeric, Then = N, Else = never> = IsNever<
|
|
79
|
+
N,
|
|
80
|
+
Else,
|
|
81
|
+
N extends Zero ? Else : `${N}` extends `-${string}` ? Then : Else
|
|
82
|
+
>
|
|
44
83
|
|
|
45
84
|
/**
|
|
46
85
|
* Check if the value it not a negative number.
|
|
@@ -56,3 +95,55 @@ export type Negative<N extends Numeric, Then = N, Else = never> = N extends Zero
|
|
|
56
95
|
* ```
|
|
57
96
|
*/
|
|
58
97
|
export type NonNegative<N extends Numeric, Then = N, Else = never> = Negative<N, Else, Then>
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Check if the type `T` is exactly the type `number` and not numeric literals.
|
|
101
|
+
*
|
|
102
|
+
* ```
|
|
103
|
+
* import type { NumberType } from 'type-plus'
|
|
104
|
+
*
|
|
105
|
+
* type R = NumberType<number> // true
|
|
106
|
+
* type R = NumberType<1> // false
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export type NumberType<T, Then = T, Else = never> = IsAny<
|
|
110
|
+
T,
|
|
111
|
+
Else,
|
|
112
|
+
[number, T] extends [T, number] ? Then : Else
|
|
113
|
+
>
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Check if the value is a positive number.
|
|
117
|
+
*
|
|
118
|
+
* ```
|
|
119
|
+
* import type { Positive } from 'type-plus'
|
|
120
|
+
*
|
|
121
|
+
* type R = Positive<1> // 1
|
|
122
|
+
* type R = Positive<0> // never
|
|
123
|
+
* type R = Positive<-1> // never
|
|
124
|
+
*
|
|
125
|
+
* type R = Positive<1, true, false> // true
|
|
126
|
+
* type R = Positive<-1, true, false> // false
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export type Positive<N extends Numeric, Then = N, Else = never> = IsNever<
|
|
130
|
+
N,
|
|
131
|
+
Else,
|
|
132
|
+
number extends N ? Else : N extends Zero ? Then : `${N}` extends `-${string}` ? Else : Then
|
|
133
|
+
>
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Is the value `N` a positive number.
|
|
137
|
+
*
|
|
138
|
+
* ```
|
|
139
|
+
* import type { IsPositive } from 'type-plus'
|
|
140
|
+
*
|
|
141
|
+
* type R = IsPositive<1> // true
|
|
142
|
+
* type R = IsPositive<0> // false
|
|
143
|
+
* type R = IsPositive<-1> // false
|
|
144
|
+
*
|
|
145
|
+
* type R = IsPositive<1, 'good', 'bad'> // 'good'
|
|
146
|
+
* type R = IsPositive<-1, 'good', 'bad> // 'bad'
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export type IsPositive<N extends Numeric, Then = true, Else = false> = Positive<N, Then, Else>
|
package/ts/object/IsDisjoint.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { And, Not } from '../predicates/index.js'
|
|
1
|
+
import type { And, Not } from '../predicates/index.js'
|
|
2
2
|
import type { AnyRecord } from './AnyRecord.js'
|
|
3
|
-
import { HasKey } from './hasKey.js'
|
|
3
|
+
import type { HasKey } from './hasKey.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Are the two records disjoint from each other.
|
package/ts/object/KnownKeys.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// known from Gerrit Birkeland @Gerrit0
|
|
3
3
|
// https://github.com/Microsoft/TypeScript/issues/25987#issuecomment-408339599
|
|
4
4
|
|
|
5
|
-
import { PrimitiveTypes } from '../PrimitiveTypes.js'
|
|
5
|
+
import type { PrimitiveTypes } from '../PrimitiveTypes.js'
|
|
6
6
|
|
|
7
7
|
// https://github.com/microsoft/TypeScript/issues/25987#issuecomment-441224690
|
|
8
8
|
export type KnownKeys<T> = T extends PrimitiveTypes
|
package/ts/object/Partial.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UnionKeys } from '../UnionKeys.js'
|
|
2
|
-
import { Omit } from './omit.js'
|
|
3
|
-
import { Pick } from './pick.js'
|
|
1
|
+
import type { UnionKeys } from '../UnionKeys.js'
|
|
2
|
+
import type { Omit } from './omit.js'
|
|
3
|
+
import type { Pick } from './pick.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Apply `Partial<>` on the selected properties.
|
package/ts/object/getField.ts
CHANGED
package/ts/object/mapKey.ts
CHANGED
package/ts/object/omit.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Pick } from './pick.js'
|
|
1
|
+
import type { UnionKeys } from '../UnionKeys.js'
|
|
2
|
+
import type { AnyRecord } from './AnyRecord.js'
|
|
3
|
+
import type { Pick } from './pick.js'
|
|
4
4
|
import { record } from './record.js'
|
|
5
|
+
import { reduceByKey } from './reduceKey.js'
|
|
5
6
|
|
|
6
7
|
// by Titian Cernicova-Dragomir
|
|
7
8
|
// https://github.com/microsoft/TypeScript/issues/28339#issuecomment-463577347
|
package/ts/object/pick.ts
CHANGED
package/ts/predicates/Equal.ts
CHANGED
package/ts/predicates/index.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from './CanAssign.js'
|
|
|
2
2
|
export type { Equal, IsEqual, IsNotEqual, NotEqual } from './Equal.js'
|
|
3
3
|
export type { Extendable, IsExtend, IsNotExtend, NotExtendable } from './Extends.js'
|
|
4
4
|
export type { If } from './If.js'
|
|
5
|
-
export type { IsAny } from './IsAny.js'
|
|
6
5
|
export type { IsEmptyObject } from './IsEmptyObject.js'
|
|
7
6
|
export * from './isType.js'
|
|
8
7
|
export type { And, Not, Or, Xor } from './logical.js'
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { PromiseValue } from './PromiseValue.js'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Merging value types from multiple promises.
|
|
5
3
|
*/
|
|
@@ -14,13 +12,13 @@ export type PromiseValueMerge<
|
|
|
14
12
|
P8 extends Promise<any> = any,
|
|
15
13
|
P9 extends Promise<any> = any
|
|
16
14
|
> = Promise<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
Awaited<P1> &
|
|
16
|
+
Awaited<P2> &
|
|
17
|
+
Awaited<P3> &
|
|
18
|
+
Awaited<P4> &
|
|
19
|
+
Awaited<P5> &
|
|
20
|
+
Awaited<P6> &
|
|
21
|
+
Awaited<P7> &
|
|
22
|
+
Awaited<P8> &
|
|
23
|
+
Awaited<P9>
|
|
26
24
|
>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.d.ts","sourceRoot":"","sources":["../../ts/array_plus/_plus.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.js","sourceRoot":"","sources":["../../ts/array_plus/_plus.ts"],"names":[],"mappings":""}
|
package/cjs/math/IsPositive.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type of positive number literal
|
|
3
|
-
* `number` type is false as it can be negative.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsPositive<N extends number, Then = true, Else = false> = number extends N ? Else : `${N}` extends `-${number}` ? Else : Then;
|
|
7
|
-
//# sourceMappingURL=IsPositive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsPositive.d.ts","sourceRoot":"","sources":["../../ts/math/IsPositive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GACnF,IAAI,GACJ,GAAG,CAAC,EAAE,SAAS,IAAI,MAAM,EAAE,GAC3B,IAAI,GACJ,IAAI,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsPositive.js","sourceRoot":"","sources":["../../ts/math/IsPositive.ts"],"names":[],"mappings":""}
|
package/cjs/math/IsWhole.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type is whole number literal.
|
|
3
|
-
* `number` type is false as it can be fractional.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsWhole<N extends number, Then = true, Else = false> = number extends N ? Else : `${N}` extends `${number}.${number}` ? Else : Then;
|
|
7
|
-
//# sourceMappingURL=IsWhole.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsWhole.d.ts","sourceRoot":"","sources":["../../ts/math/IsWhole.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GAChF,IAAI,GACJ,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,GACpC,IAAI,GACJ,IAAI,CAAA"}
|
package/cjs/math/IsWhole.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsWhole.js","sourceRoot":"","sources":["../../ts/math/IsWhole.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.d.ts","sourceRoot":"","sources":["../../ts/number_plus/_plus.ts"],"names":[],"mappings":"AAAA,mBAAmB,aAAa,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.js","sourceRoot":"","sources":["../../ts/number_plus/_plus.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsAny.d.ts","sourceRoot":"","sources":["../../ts/predicates/IsAny.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsAny.js","sourceRoot":"","sources":["../../ts/predicates/IsAny.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.d.ts","sourceRoot":"","sources":["../../ts/array_plus/_plus.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA"}
|
package/esm/array_plus/_plus.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.js","sourceRoot":"","sources":["../../ts/array_plus/_plus.ts"],"names":[],"mappings":""}
|
package/esm/math/IsPositive.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type of positive number literal
|
|
3
|
-
* `number` type is false as it can be negative.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsPositive<N extends number, Then = true, Else = false> = number extends N ? Else : `${N}` extends `-${number}` ? Else : Then;
|
|
7
|
-
//# sourceMappingURL=IsPositive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsPositive.d.ts","sourceRoot":"","sources":["../../ts/math/IsPositive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GACnF,IAAI,GACJ,GAAG,CAAC,EAAE,SAAS,IAAI,MAAM,EAAE,GAC3B,IAAI,GACJ,IAAI,CAAA"}
|
package/esm/math/IsPositive.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsPositive.js","sourceRoot":"","sources":["../../ts/math/IsPositive.ts"],"names":[],"mappings":""}
|
package/esm/math/IsWhole.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type is whole number literal.
|
|
3
|
-
* `number` type is false as it can be fractional.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsWhole<N extends number, Then = true, Else = false> = number extends N ? Else : `${N}` extends `${number}.${number}` ? Else : Then;
|
|
7
|
-
//# sourceMappingURL=IsWhole.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsWhole.d.ts","sourceRoot":"","sources":["../../ts/math/IsWhole.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GAChF,IAAI,GACJ,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,IAAI,MAAM,EAAE,GACpC,IAAI,GACJ,IAAI,CAAA"}
|
package/esm/math/IsWhole.js
DELETED
package/esm/math/IsWhole.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsWhole.js","sourceRoot":"","sources":["../../ts/math/IsWhole.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.d.ts","sourceRoot":"","sources":["../../ts/number_plus/_plus.ts"],"names":[],"mappings":"AAAA,mBAAmB,aAAa,CAAA"}
|
package/esm/number_plus/_plus.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_plus.js","sourceRoot":"","sources":["../../ts/number_plus/_plus.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsAny.d.ts","sourceRoot":"","sources":["../../ts/predicates/IsAny.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA"}
|
package/esm/predicates/IsAny.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsAny.js","sourceRoot":"","sources":["../../ts/predicates/IsAny.ts"],"names":[],"mappings":""}
|
package/ts/array_plus/_plus.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './array.js'
|
package/ts/math/IsPositive.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type of positive number literal
|
|
3
|
-
* `number` type is false as it can be negative.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsPositive<N extends number, Then = true, Else = false> = number extends N
|
|
7
|
-
? Else
|
|
8
|
-
: `${N}` extends `-${number}`
|
|
9
|
-
? Else
|
|
10
|
-
: Then
|
package/ts/math/IsWhole.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if type is whole number literal.
|
|
3
|
-
* `number` type is false as it can be fractional.
|
|
4
|
-
* @see https://itnext.io/implementing-arithmetic-within-typescripts-type-system-a1ef140a6f6f
|
|
5
|
-
*/
|
|
6
|
-
export type IsWhole<N extends number, Then = true, Else = false> = number extends N
|
|
7
|
-
? Else
|
|
8
|
-
: `${N}` extends `${number}.${number}`
|
|
9
|
-
? Else
|
|
10
|
-
: Then
|
package/ts/predicates/IsAny.ts
DELETED
|
File without changes
|