ts-data-forge 9.0.0 → 9.0.1
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/dist/array/impl/array-utils-creation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-creation.mjs +17 -112
- package/dist/array/impl/array-utils-creation.mjs.map +1 -1
- package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
- package/dist/array/impl/array-utils-element-access.mjs +22 -61
- package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
- package/dist/array/impl/array-utils-iterators.d.mts.map +1 -1
- package/dist/array/impl/array-utils-iterators.mjs +9 -63
- package/dist/array/impl/array-utils-iterators.mjs.map +1 -1
- package/dist/array/impl/array-utils-modification.mjs +78 -78
- package/dist/array/impl/array-utils-modification.mjs.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.mjs +95 -89
- package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
- package/dist/array/impl/array-utils-search.mjs +100 -92
- package/dist/array/impl/array-utils-search.mjs.map +1 -1
- package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
- package/dist/array/impl/array-utils-set-op.mjs +31 -141
- package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
- package/dist/array/impl/array-utils-size.d.mts.map +1 -1
- package/dist/array/impl/array-utils-size.mjs +4 -8
- package/dist/array/impl/array-utils-size.mjs.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.mjs +11 -12
- package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
- package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slicing.mjs +44 -96
- package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
- package/dist/array/impl/array-utils-transformation.d.mts +1 -1
- package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-transformation.mjs +150 -292
- package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
- package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-validation.mjs +18 -169
- package/dist/array/impl/array-utils-validation.mjs.map +1 -1
- package/dist/collections/imap-mapped.d.mts.map +1 -1
- package/dist/collections/imap-mapped.mjs +243 -330
- package/dist/collections/imap-mapped.mjs.map +1 -1
- package/dist/collections/imap.d.mts.map +1 -1
- package/dist/collections/imap.mjs +190 -275
- package/dist/collections/imap.mjs.map +1 -1
- package/dist/collections/iset-mapped.d.mts +1 -1
- package/dist/collections/iset-mapped.d.mts.map +1 -1
- package/dist/collections/iset-mapped.mjs +222 -444
- package/dist/collections/iset-mapped.mjs.map +1 -1
- package/dist/collections/iset.d.mts +1 -1
- package/dist/collections/iset.d.mts.map +1 -1
- package/dist/collections/iset.mjs +158 -324
- package/dist/collections/iset.mjs.map +1 -1
- package/dist/collections/queue.d.mts.map +1 -1
- package/dist/collections/queue.mjs +106 -178
- package/dist/collections/queue.mjs.map +1 -1
- package/dist/collections/stack.d.mts.map +1 -1
- package/dist/collections/stack.mjs +95 -165
- package/dist/collections/stack.mjs.map +1 -1
- package/dist/expect-type.d.mts +1 -1
- package/dist/expect-type.d.mts.map +1 -1
- package/dist/expect-type.mjs +1 -69
- package/dist/expect-type.mjs.map +1 -1
- package/dist/functional/match.mjs +9 -9
- package/dist/functional/match.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.mjs +13 -14
- package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-filter.mjs +14 -15
- package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.mjs +10 -11
- package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.mjs +1 -25
- package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.mjs +0 -19
- package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.mjs +1 -23
- package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.mjs +0 -20
- package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-map.mjs +13 -14
- package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-none.mjs +0 -16
- package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.mjs +10 -11
- package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-some.mjs +2 -21
- package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.mjs +1 -27
- package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.mjs +9 -10
- package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs +4 -32
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.mjs +4 -4
- package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-zip.mjs +1 -35
- package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
- package/dist/functional/optional/impl/tag.mjs +2 -3
- package/dist/functional/optional/impl/tag.mjs.map +1 -1
- package/dist/functional/pipe.d.mts.map +1 -1
- package/dist/functional/pipe.mjs +9 -34
- package/dist/functional/pipe.mjs.map +1 -1
- package/dist/functional/result/impl/result-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-err.mjs +2 -27
- package/dist/functional/result/impl/result-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.mjs +13 -15
- package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
- package/dist/functional/result/impl/result-flat-map.mjs +16 -16
- package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-fold.mjs +16 -16
- package/dist/functional/result/impl/result-fold.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-promise.mjs +4 -31
- package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.mjs +8 -38
- package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-err.mjs +0 -19
- package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-ok.mjs +0 -19
- package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-result.mjs +1 -23
- package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
- package/dist/functional/result/impl/result-map-err.mjs +16 -16
- package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-map.mjs +16 -16
- package/dist/functional/result/impl/result-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-ok.mjs +2 -27
- package/dist/functional/result/impl/result-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-or-else.mjs +10 -12
- package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
- package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
- package/dist/functional/result/impl/result-swap.mjs +4 -22
- package/dist/functional/result/impl/result-swap.mjs.map +1 -1
- package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
- package/dist/functional/result/impl/result-to-optional.mjs +0 -27
- package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.mjs +9 -11
- package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs +13 -40
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.mjs +4 -32
- package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs +9 -11
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.mjs +4 -4
- package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.mjs +4 -35
- package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
- package/dist/functional/result/impl/result-zip.mjs +1 -34
- package/dist/functional/result/impl/result-zip.mjs.map +1 -1
- package/dist/functional/result/impl/tag.mjs +2 -3
- package/dist/functional/result/impl/tag.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/tag.mjs +3 -5
- package/dist/functional/ternary-result/impl/tag.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs +2 -15
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs +13 -13
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs +27 -26
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs +21 -22
- package/dist/functional/ternary-result/impl/ternary-result-fold.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs +4 -20
- package/dist/functional/ternary-result/impl/ternary-result-from-promise.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs +7 -25
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs +0 -17
- package/dist/functional/ternary-result/impl/ternary-result-is-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs +0 -19
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs +1 -25
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs +0 -18
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs +13 -15
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs +18 -18
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs +21 -22
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs +2 -16
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs +9 -9
- package/dist/functional/ternary-result/impl/ternary-result-or-else.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs +4 -22
- package/dist/functional/ternary-result/impl/ternary-result-to-optional.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs +9 -9
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs +12 -27
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs +4 -19
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs +9 -9
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs +4 -5
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs +15 -27
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs +9 -9
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs +10 -24
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs +4 -19
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs +3 -19
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs +14 -45
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.d.mts +1 -1
- package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.mjs +8 -9
- package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -1
- package/dist/guard/has-key.d.mts.map +1 -1
- package/dist/guard/has-key.mjs +0 -41
- package/dist/guard/has-key.mjs.map +1 -1
- package/dist/guard/is-length-bounded-string.d.mts.map +1 -1
- package/dist/guard/is-length-bounded-string.mjs +0 -157
- package/dist/guard/is-length-bounded-string.mjs.map +1 -1
- package/dist/guard/is-non-empty-string.d.mts +1 -1
- package/dist/guard/is-non-empty-string.d.mts.map +1 -1
- package/dist/guard/is-non-empty-string.mjs +1 -38
- package/dist/guard/is-non-empty-string.mjs.map +1 -1
- package/dist/guard/is-non-null-object.d.mts.map +1 -1
- package/dist/guard/is-non-null-object.mjs +1 -35
- package/dist/guard/is-non-null-object.mjs.map +1 -1
- package/dist/guard/is-primitive.d.mts.map +1 -1
- package/dist/guard/is-primitive.mjs +12 -43
- package/dist/guard/is-primitive.mjs.map +1 -1
- package/dist/guard/is-record.d.mts.map +1 -1
- package/dist/guard/is-record.mjs +0 -86
- package/dist/guard/is-record.mjs.map +1 -1
- package/dist/guard/is-type.d.mts.map +1 -1
- package/dist/guard/is-type.mjs +12 -399
- package/dist/guard/is-type.mjs.map +1 -1
- package/dist/guard/key-is-in.d.mts.map +1 -1
- package/dist/guard/key-is-in.mjs +0 -40
- package/dist/guard/key-is-in.mjs.map +1 -1
- package/dist/iterator/range.mjs +16 -16
- package/dist/iterator/range.mjs.map +1 -1
- package/dist/json/json.d.mts.map +1 -1
- package/dist/json/json.mjs +52 -340
- package/dist/json/json.mjs.map +1 -1
- package/dist/number/branded-types/finite-number.d.mts +3 -3
- package/dist/number/branded-types/finite-number.mjs +135 -154
- package/dist/number/branded-types/finite-number.mjs.map +1 -1
- package/dist/number/branded-types/int.d.mts +4 -4
- package/dist/number/branded-types/int.mjs +205 -245
- package/dist/number/branded-types/int.mjs.map +1 -1
- package/dist/number/branded-types/int16.d.mts +15 -15
- package/dist/number/branded-types/int16.mjs +116 -123
- package/dist/number/branded-types/int16.mjs.map +1 -1
- package/dist/number/branded-types/int32.d.mts +11 -11
- package/dist/number/branded-types/int32.mjs +116 -123
- package/dist/number/branded-types/int32.mjs.map +1 -1
- package/dist/number/branded-types/negative-finite-number.d.mts +4 -4
- package/dist/number/branded-types/negative-finite-number.mjs +129 -144
- package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/negative-int.d.mts +5 -5
- package/dist/number/branded-types/negative-int.mjs +94 -113
- package/dist/number/branded-types/negative-int.mjs.map +1 -1
- package/dist/number/branded-types/negative-safe-int.d.mts +5 -5
- package/dist/number/branded-types/negative-safe-int.mjs +103 -124
- package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-finite-number.d.mts +5 -5
- package/dist/number/branded-types/non-negative-finite-number.mjs +136 -142
- package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int16.d.mts +16 -16
- package/dist/number/branded-types/non-negative-int16.mjs +109 -118
- package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int32.d.mts +12 -12
- package/dist/number/branded-types/non-negative-int32.mjs +110 -119
- package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-finite-number.d.mts +3 -3
- package/dist/number/branded-types/non-positive-finite-number.mjs +120 -124
- package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-int.d.mts +4 -4
- package/dist/number/branded-types/non-positive-int.mjs +167 -212
- package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
- package/dist/number/branded-types/non-positive-safe-int.d.mts +4 -4
- package/dist/number/branded-types/non-positive-safe-int.mjs +95 -106
- package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-finite-number.d.mts +4 -4
- package/dist/number/branded-types/non-zero-finite-number.mjs +114 -123
- package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int.d.mts +2 -2
- package/dist/number/branded-types/non-zero-int.mjs +72 -83
- package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int16.d.mts +7 -7
- package/dist/number/branded-types/non-zero-int16.mjs +96 -107
- package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int32.d.mts +5 -5
- package/dist/number/branded-types/non-zero-int32.mjs +97 -108
- package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-safe-int.d.mts +2 -2
- package/dist/number/branded-types/non-zero-safe-int.mjs +100 -111
- package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint16.d.mts +8 -8
- package/dist/number/branded-types/non-zero-uint16.mjs +96 -107
- package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint32.d.mts +6 -6
- package/dist/number/branded-types/non-zero-uint32.mjs +96 -107
- package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
- package/dist/number/branded-types/positive-finite-number.d.mts +8 -8
- package/dist/number/branded-types/positive-finite-number.mjs +139 -141
- package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/positive-int.d.mts +11 -11
- package/dist/number/branded-types/positive-int.mjs +228 -271
- package/dist/number/branded-types/positive-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-int16.d.mts +19 -19
- package/dist/number/branded-types/positive-int16.mjs +109 -118
- package/dist/number/branded-types/positive-int16.mjs.map +1 -1
- package/dist/number/branded-types/positive-int32.d.mts +15 -15
- package/dist/number/branded-types/positive-int32.mjs +109 -118
- package/dist/number/branded-types/positive-int32.mjs.map +1 -1
- package/dist/number/branded-types/positive-safe-int.d.mts +11 -11
- package/dist/number/branded-types/positive-safe-int.mjs +244 -275
- package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint16.d.mts +17 -17
- package/dist/number/branded-types/positive-uint16.mjs +109 -118
- package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint32.d.mts +13 -13
- package/dist/number/branded-types/positive-uint32.mjs +110 -119
- package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
- package/dist/number/branded-types/safe-int.d.mts +4 -4
- package/dist/number/branded-types/safe-int.mjs +251 -292
- package/dist/number/branded-types/safe-int.mjs.map +1 -1
- package/dist/number/branded-types/safe-uint.d.mts +8 -8
- package/dist/number/branded-types/safe-uint.mjs +111 -119
- package/dist/number/branded-types/safe-uint.mjs.map +1 -1
- package/dist/number/branded-types/uint.d.mts +8 -8
- package/dist/number/branded-types/uint.mjs +198 -225
- package/dist/number/branded-types/uint.mjs.map +1 -1
- package/dist/number/branded-types/uint16.d.mts +14 -14
- package/dist/number/branded-types/uint16.mjs +109 -119
- package/dist/number/branded-types/uint16.mjs.map +1 -1
- package/dist/number/branded-types/uint32.d.mts +10 -10
- package/dist/number/branded-types/uint32.mjs +110 -117
- package/dist/number/branded-types/uint32.mjs.map +1 -1
- package/dist/number/enum/int8.mjs +119 -145
- package/dist/number/enum/int8.mjs.map +1 -1
- package/dist/number/enum/uint8.mjs +107 -121
- package/dist/number/enum/uint8.mjs.map +1 -1
- package/dist/number/num.d.mts +2 -2
- package/dist/number/num.d.mts.map +1 -1
- package/dist/number/num.mjs +76 -537
- package/dist/number/num.mjs.map +1 -1
- package/dist/number/refined-number-utils.d.mts +1 -1
- package/dist/number/refined-number-utils.d.mts.map +1 -1
- package/dist/number/refined-number-utils.mjs +127 -263
- package/dist/number/refined-number-utils.mjs.map +1 -1
- package/dist/object/object.d.mts.map +1 -1
- package/dist/object/object.mjs +107 -222
- package/dist/object/object.mjs.map +1 -1
- package/dist/others/cast-mutable.d.mts.map +1 -1
- package/dist/others/cast-mutable.mjs +8 -37
- package/dist/others/cast-mutable.mjs.map +1 -1
- package/dist/others/cast-readonly.d.mts.map +1 -1
- package/dist/others/cast-readonly.mjs +8 -36
- package/dist/others/cast-readonly.mjs.map +1 -1
- package/dist/others/debounce-function.d.mts.map +1 -1
- package/dist/others/debounce-function.mjs +7 -16
- package/dist/others/debounce-function.mjs.map +1 -1
- package/dist/others/fast-deep-equal.d.mts.map +1 -1
- package/dist/others/fast-deep-equal.mjs +43 -59
- package/dist/others/fast-deep-equal.mjs.map +1 -1
- package/dist/others/if-then.d.mts.map +1 -1
- package/dist/others/if-then.mjs +0 -29
- package/dist/others/if-then.mjs.map +1 -1
- package/dist/others/map-nullable.mjs +9 -9
- package/dist/others/map-nullable.mjs.map +1 -1
- package/dist/others/memoize-function.mjs +12 -12
- package/dist/others/memoize-function.mjs.map +1 -1
- package/dist/others/tuple.d.mts.map +1 -1
- package/dist/others/tuple.mjs +0 -50
- package/dist/others/tuple.mjs.map +1 -1
- package/dist/others/unknown-to-string.d.mts.map +1 -1
- package/dist/others/unknown-to-string.mjs +41 -88
- package/dist/others/unknown-to-string.mjs.map +1 -1
- package/dist/promise/promise.d.mts.map +1 -1
- package/dist/promise/promise.mjs +4 -49
- package/dist/promise/promise.mjs.map +1 -1
- package/package.json +8 -7
|
@@ -1,116 +1,105 @@
|
|
|
1
1
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
2
2
|
|
|
3
|
-
const typeNameInMessage =
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
const typeNameInMessage = "a non-zero integer in [1, 2^32)";
|
|
4
|
+
const {
|
|
5
|
+
MAX_VALUE,
|
|
6
|
+
MIN_VALUE,
|
|
7
|
+
add,
|
|
8
|
+
castType,
|
|
9
|
+
clamp,
|
|
10
|
+
is,
|
|
11
|
+
max: max_,
|
|
12
|
+
min: min_,
|
|
13
|
+
mul,
|
|
14
|
+
pow,
|
|
15
|
+
randomNonZero: random
|
|
16
|
+
} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger({
|
|
17
|
+
integerOrSafeInteger: "SafeInteger",
|
|
18
|
+
nonZero: true,
|
|
19
|
+
MIN_VALUE: 1,
|
|
20
|
+
MAX_VALUE: 2 ** 32 - 1,
|
|
21
|
+
typeNameInMessage
|
|
10
22
|
});
|
|
11
|
-
/**
|
|
12
|
-
* Checks if a number is a NonZeroUint32 (32-bit non-zero unsigned integer in
|
|
13
|
-
* the range [1, 2^32)).
|
|
14
|
-
*
|
|
15
|
-
* @param value The value to check.
|
|
16
|
-
* @returns `true` if the value is a NonZeroUint32, `false` otherwise.
|
|
17
|
-
*/
|
|
18
23
|
const isNonZeroUint32 = is;
|
|
19
|
-
/**
|
|
20
|
-
* Casts a number to a NonZeroUint32 type.
|
|
21
|
-
*
|
|
22
|
-
* @param value The value to cast.
|
|
23
|
-
* @returns The value as a NonZeroUint32 type.
|
|
24
|
-
* @throws {TypeError} If the value is not a non-zero integer in [1, 2^32).
|
|
25
|
-
*/
|
|
26
24
|
const asNonZeroUint32 = castType;
|
|
27
|
-
/**
|
|
28
|
-
* Namespace providing type-safe arithmetic operations for 32-bit non-zero
|
|
29
|
-
* unsigned integers.
|
|
30
|
-
*
|
|
31
|
-
* All operations automatically clamp results to the valid NonZeroUint32 range
|
|
32
|
-
* [1, 4294967295]. This ensures that all arithmetic maintains the 32-bit
|
|
33
|
-
* non-zero unsigned integer constraint, with results below 1 clamped to
|
|
34
|
-
* MIN_VALUE and overflow results clamped to MAX_VALUE.
|
|
35
|
-
*/
|
|
36
25
|
const NonZeroUint32 = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Type guard to check if a value is a NonZeroUint32.
|
|
28
|
+
*
|
|
29
|
+
* @param value The value to check.
|
|
30
|
+
* @returns `true` if the value is a 32-bit non-zero unsigned integer, `false`
|
|
31
|
+
* otherwise.
|
|
32
|
+
*/
|
|
33
|
+
is,
|
|
34
|
+
/**
|
|
35
|
+
* The minimum value for a 32-bit non-zero unsigned integer.
|
|
36
|
+
*
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
MIN_VALUE,
|
|
40
|
+
/**
|
|
41
|
+
* The maximum value for a 32-bit non-zero unsigned integer.
|
|
42
|
+
*
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
MAX_VALUE,
|
|
46
|
+
/**
|
|
47
|
+
* Returns the smaller of two NonZeroUint32 values.
|
|
48
|
+
*
|
|
49
|
+
* @param a The first NonZeroUint32.
|
|
50
|
+
* @param b The second NonZeroUint32.
|
|
51
|
+
* @returns The minimum value as a NonZeroUint32.
|
|
52
|
+
*/
|
|
53
|
+
min: min_,
|
|
54
|
+
/**
|
|
55
|
+
* Returns the larger of two NonZeroUint32 values.
|
|
56
|
+
*
|
|
57
|
+
* @param a The first NonZeroUint32.
|
|
58
|
+
* @param b The second NonZeroUint32.
|
|
59
|
+
* @returns The maximum value as a NonZeroUint32.
|
|
60
|
+
*/
|
|
61
|
+
max: max_,
|
|
62
|
+
/**
|
|
63
|
+
* Clamps a number to the NonZeroUint32 range.
|
|
64
|
+
*
|
|
65
|
+
* @param value The number to clamp.
|
|
66
|
+
* @returns The value clamped to [1, 4294967295] as a NonZeroUint32.
|
|
67
|
+
*/
|
|
68
|
+
clamp,
|
|
69
|
+
/**
|
|
70
|
+
* Generates a random NonZeroUint32 value within the valid range.
|
|
71
|
+
*
|
|
72
|
+
* @returns A random NonZeroUint32 between 1 and 4294967295.
|
|
73
|
+
*/
|
|
74
|
+
random,
|
|
75
|
+
/**
|
|
76
|
+
* Raises a NonZeroUint32 to the power of another NonZeroUint32.
|
|
77
|
+
*
|
|
78
|
+
* @param a The base NonZeroUint32.
|
|
79
|
+
* @param b The exponent NonZeroUint32.
|
|
80
|
+
* @returns `a ** b` clamped to [1, 4294967295] as a NonZeroUint32.
|
|
81
|
+
*/
|
|
82
|
+
pow,
|
|
83
|
+
/**
|
|
84
|
+
* Adds two NonZeroUint32 values.
|
|
85
|
+
*
|
|
86
|
+
* @param a The first NonZeroUint32.
|
|
87
|
+
* @param b The second NonZeroUint32.
|
|
88
|
+
* @returns `a + b` clamped to [1, 4294967295] as a NonZeroUint32.
|
|
89
|
+
*/
|
|
90
|
+
add,
|
|
91
|
+
/**
|
|
92
|
+
* Multiplies two NonZeroUint32 values.
|
|
93
|
+
*
|
|
94
|
+
* Both `add` and `mul` stay within `[1, 4294967295]`. For the non-closed
|
|
95
|
+
* operations (`sub`/`div`, whose result may be `0`) use {@link Num.sub} /
|
|
96
|
+
* {@link Num.divInt}.
|
|
97
|
+
*
|
|
98
|
+
* @param a The first NonZeroUint32.
|
|
99
|
+
* @param b The second NonZeroUint32.
|
|
100
|
+
* @returns `a * b` clamped to [1, 4294967295] as a NonZeroUint32.
|
|
101
|
+
*/
|
|
102
|
+
mul
|
|
114
103
|
};
|
|
115
104
|
|
|
116
105
|
export { NonZeroUint32, asNonZeroUint32, isNonZeroUint32 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"non-zero-uint32.mjs","sources":["../../../src/number/branded-types/non-zero-uint32.mts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"non-zero-uint32.mjs","sources":["../../../src/number/branded-types/non-zero-uint32.mts"],"sourcesContent":["import { type NonZeroUint32 as TtfImported_NonZeroUint32 } from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type NonZeroUint32 = TtfImported_NonZeroUint32;\n\ntype ElementType = NonZeroUint32;\n\nconst typeNameInMessage = 'a non-zero integer in [1, 2^32)';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n add,\n castType,\n clamp,\n is,\n max: max_,\n min: min_,\n mul,\n pow,\n randomNonZero: random,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n 1,\n number\n>({\n integerOrSafeInteger: 'SafeInteger',\n nonZero: true,\n MIN_VALUE: 1,\n MAX_VALUE: 2 ** 32 - 1,\n typeNameInMessage,\n} as const);\n\n/**\n * Checks if a number is a NonZeroUint32 (32-bit non-zero unsigned integer in\n * the range [1, 2^32)).\n *\n * @param value The value to check.\n * @returns `true` if the value is a NonZeroUint32, `false` otherwise.\n */\nexport const isNonZeroUint32 = is;\n\n/**\n * Casts a number to a NonZeroUint32 type.\n *\n * @param value The value to cast.\n * @returns The value as a NonZeroUint32 type.\n * @throws {TypeError} If the value is not a non-zero integer in [1, 2^32).\n */\nexport const asNonZeroUint32 = castType;\n\n/**\n * Namespace providing type-safe arithmetic operations for 32-bit non-zero\n * unsigned integers.\n *\n * All operations automatically clamp results to the valid NonZeroUint32 range\n * [1, 4294967295]. This ensures that all arithmetic maintains the 32-bit\n * non-zero unsigned integer constraint, with results below 1 clamped to\n * MIN_VALUE and overflow results clamped to MAX_VALUE.\n */\nexport const NonZeroUint32 = {\n /**\n * Type guard to check if a value is a NonZeroUint32.\n *\n * @param value The value to check.\n * @returns `true` if the value is a 32-bit non-zero unsigned integer, `false`\n * otherwise.\n */\n is,\n\n /**\n * The minimum value for a 32-bit non-zero unsigned integer.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * The maximum value for a 32-bit non-zero unsigned integer.\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the smaller of two NonZeroUint32 values.\n *\n * @param a The first NonZeroUint32.\n * @param b The second NonZeroUint32.\n * @returns The minimum value as a NonZeroUint32.\n */\n min: min_,\n\n /**\n * Returns the larger of two NonZeroUint32 values.\n *\n * @param a The first NonZeroUint32.\n * @param b The second NonZeroUint32.\n * @returns The maximum value as a NonZeroUint32.\n */\n max: max_,\n\n /**\n * Clamps a number to the NonZeroUint32 range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to [1, 4294967295] as a NonZeroUint32.\n */\n clamp,\n\n /**\n * Generates a random NonZeroUint32 value within the valid range.\n *\n * @returns A random NonZeroUint32 between 1 and 4294967295.\n */\n random,\n\n /**\n * Raises a NonZeroUint32 to the power of another NonZeroUint32.\n *\n * @param a The base NonZeroUint32.\n * @param b The exponent NonZeroUint32.\n * @returns `a ** b` clamped to [1, 4294967295] as a NonZeroUint32.\n */\n pow,\n\n /**\n * Adds two NonZeroUint32 values.\n *\n * @param a The first NonZeroUint32.\n * @param b The second NonZeroUint32.\n * @returns `a + b` clamped to [1, 4294967295] as a NonZeroUint32.\n */\n add,\n\n /**\n * Multiplies two NonZeroUint32 values.\n *\n * Both `add` and `mul` stay within `[1, 4294967295]`. For the non-closed\n * operations (`sub`/`div`, whose result may be `0`) use {@link Num.sub} /\n * {@link Num.divInt}.\n *\n * @param a The first NonZeroUint32.\n * @param b The second NonZeroUint32.\n * @returns `a * b` clamped to [1, 4294967295] as a NonZeroUint32.\n */\n mul,\n} as const;\n\nexpectType<\n keyof typeof NonZeroUint32,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'positive' | 'range',\n 'add' | 'mul'\n >\n>('=');\n\nexpectType<\n typeof NonZeroUint32,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'positive' | 'range',\n 'add' | 'mul'\n >\n>('<=');\n"],"names":[],"mappings":";;AAQA,MAAM,iBAAA,GAAoB,iCAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,GAAA;AAAA,EACA,aAAA,EAAe;AACjB,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,OAAA,EAAS,IAAA;AAAA,EACT,SAAA,EAAW,CAAA;AAAA,EACX,SAAA,EAAW,KAAK,EAAA,GAAK,CAAA;AAAA,EACrB;AACF,CAAU,CAAA;AASH,MAAM,eAAA,GAAkB;AASxB,MAAM,eAAA,GAAkB;AAWxB,MAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ3B,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA;AACF;;;;"}
|
|
@@ -17,15 +17,15 @@ export declare const isPositiveFiniteNumber: (a: number) => a is TtfImported_Pos
|
|
|
17
17
|
* @throws {TypeError} If the value is not a positive finite number.
|
|
18
18
|
*/
|
|
19
19
|
export declare const asPositiveFiniteNumber: <N extends number>(x: N) => number & {
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
20
|
+
readonly "!=0": true;
|
|
21
|
+
readonly "<=0": false;
|
|
22
22
|
readonly "> -2^16": true;
|
|
23
23
|
readonly "> -2^32": true;
|
|
24
24
|
readonly ">= -2^15": true;
|
|
25
25
|
readonly ">= -2^31": true;
|
|
26
26
|
readonly ">=0": true;
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
27
|
+
readonly Finite: true;
|
|
28
|
+
readonly NaNValue: false;
|
|
29
29
|
} & Readonly<{
|
|
30
30
|
'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
|
|
31
31
|
}> & N;
|
|
@@ -144,15 +144,15 @@ export declare const PositiveFiniteNumber: {
|
|
|
144
144
|
* @returns `a / b` clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
145
145
|
*/
|
|
146
146
|
readonly div: (x: TtfImported_PositiveFiniteNumber, y: number & {
|
|
147
|
-
readonly
|
|
148
|
-
readonly
|
|
147
|
+
readonly "!=0": true;
|
|
148
|
+
readonly "<=0": false;
|
|
149
149
|
readonly "> -2^16": true;
|
|
150
150
|
readonly "> -2^32": true;
|
|
151
151
|
readonly ">= -2^15": true;
|
|
152
152
|
readonly ">= -2^31": true;
|
|
153
153
|
readonly ">=0": true;
|
|
154
|
-
readonly
|
|
155
|
-
readonly
|
|
154
|
+
readonly Finite: true;
|
|
155
|
+
readonly NaNValue: false;
|
|
156
156
|
} & Readonly<{
|
|
157
157
|
'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
|
|
158
158
|
}>) => TtfImported_PositiveFiniteNumber;
|
|
@@ -1,150 +1,148 @@
|
|
|
1
1
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
2
2
|
|
|
3
|
-
const typeNameInMessage =
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const typeNameInMessage = "a positive finite number";
|
|
4
|
+
const {
|
|
5
|
+
MIN_VALUE,
|
|
6
|
+
add,
|
|
7
|
+
castType,
|
|
8
|
+
clamp,
|
|
9
|
+
div,
|
|
10
|
+
is,
|
|
11
|
+
max: max_,
|
|
12
|
+
min: min_,
|
|
13
|
+
mul,
|
|
14
|
+
pow,
|
|
15
|
+
random,
|
|
16
|
+
sub
|
|
17
|
+
} = TsDataForgeInternals.RefinedNumberUtils.operatorsForFloat({
|
|
18
|
+
MIN_VALUE: Number.MIN_VALUE,
|
|
19
|
+
MAX_VALUE: Number.MAX_VALUE,
|
|
20
|
+
typeNameInMessage
|
|
8
21
|
});
|
|
9
|
-
const floor = (x) =>
|
|
10
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
11
|
-
Math.floor(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
17
|
-
Math.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const floor = (x) => (
|
|
23
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
24
|
+
Math.floor(
|
|
25
|
+
x
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
const ceil = (x) => (
|
|
29
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
30
|
+
Math.ceil(x)
|
|
31
|
+
);
|
|
32
|
+
const round = (x) => (
|
|
33
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
34
|
+
Math.round(
|
|
35
|
+
x
|
|
36
|
+
)
|
|
37
|
+
);
|
|
24
38
|
const isPositiveFiniteNumber = is;
|
|
25
|
-
/**
|
|
26
|
-
* Casts a number to a PositiveFiniteNumber type.
|
|
27
|
-
*
|
|
28
|
-
* @param value The value to cast.
|
|
29
|
-
* @returns The value as a PositiveFiniteNumber type.
|
|
30
|
-
* @throws {TypeError} If the value is not a positive finite number.
|
|
31
|
-
*/
|
|
32
39
|
const asPositiveFiniteNumber = castType;
|
|
33
|
-
/**
|
|
34
|
-
* Namespace providing type-safe arithmetic operations for positive finite
|
|
35
|
-
* numbers.
|
|
36
|
-
*
|
|
37
|
-
* All operations maintain the positive constraint by clamping non-positive
|
|
38
|
-
* results to MIN_VALUE, while ensuring results remain finite (excluding NaN and
|
|
39
|
-
* Infinity). This type is useful for representing quantities that must always
|
|
40
|
-
* be positive, such as probabilities, magnitudes, and physical measurements.
|
|
41
|
-
*/
|
|
42
40
|
const PositiveFiniteNumber = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Type guard to check if a value is a PositiveFiniteNumber.
|
|
43
|
+
*
|
|
44
|
+
* @param value The value to check.
|
|
45
|
+
* @returns `true` if the value is a positive finite number, `false`
|
|
46
|
+
* otherwise.
|
|
47
|
+
*/
|
|
48
|
+
is,
|
|
49
|
+
/**
|
|
50
|
+
* The minimum value for a positive finite number.
|
|
51
|
+
*
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
MIN_VALUE,
|
|
55
|
+
/**
|
|
56
|
+
* Returns the smaller of two PositiveFiniteNumber values.
|
|
57
|
+
*
|
|
58
|
+
* @param a The first PositiveFiniteNumber.
|
|
59
|
+
* @param b The second PositiveFiniteNumber.
|
|
60
|
+
* @returns The minimum value as a PositiveFiniteNumber.
|
|
61
|
+
*/
|
|
62
|
+
min: min_,
|
|
63
|
+
/**
|
|
64
|
+
* Returns the larger of two PositiveFiniteNumber values.
|
|
65
|
+
*
|
|
66
|
+
* @param a The first PositiveFiniteNumber.
|
|
67
|
+
* @param b The second PositiveFiniteNumber.
|
|
68
|
+
* @returns The maximum value as a PositiveFiniteNumber.
|
|
69
|
+
*/
|
|
70
|
+
max: max_,
|
|
71
|
+
/**
|
|
72
|
+
* Clamps a number to the positive finite range.
|
|
73
|
+
*
|
|
74
|
+
* @param value The number to clamp.
|
|
75
|
+
* @returns The value clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
76
|
+
*/
|
|
77
|
+
clamp,
|
|
78
|
+
/**
|
|
79
|
+
* Rounds down a PositiveFiniteNumber to the nearest integer.
|
|
80
|
+
*
|
|
81
|
+
* @param x The PositiveFiniteNumber to round down.
|
|
82
|
+
* @returns The floor value as a Uint (can be 0).
|
|
83
|
+
*/
|
|
84
|
+
floor,
|
|
85
|
+
/**
|
|
86
|
+
* Rounds up a PositiveFiniteNumber to the nearest integer.
|
|
87
|
+
*
|
|
88
|
+
* @param x The PositiveFiniteNumber to round up.
|
|
89
|
+
* @returns The ceiling value as a PositiveInt (always >= 1).
|
|
90
|
+
*/
|
|
91
|
+
ceil,
|
|
92
|
+
/**
|
|
93
|
+
* Rounds a PositiveFiniteNumber to the nearest integer.
|
|
94
|
+
*
|
|
95
|
+
* @param x The PositiveFiniteNumber to round.
|
|
96
|
+
* @returns The rounded value as a Uint (can be 0 if x < 0.5).
|
|
97
|
+
*/
|
|
98
|
+
round,
|
|
99
|
+
/**
|
|
100
|
+
* Generates a random PositiveFiniteNumber value.
|
|
101
|
+
*
|
|
102
|
+
* @returns A random positive finite number.
|
|
103
|
+
*/
|
|
104
|
+
random,
|
|
105
|
+
/**
|
|
106
|
+
* Raises a PositiveFiniteNumber to the power of another PositiveFiniteNumber.
|
|
107
|
+
*
|
|
108
|
+
* @param a The base PositiveFiniteNumber.
|
|
109
|
+
* @param b The exponent PositiveFiniteNumber.
|
|
110
|
+
* @returns `a ** b` clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
111
|
+
*/
|
|
112
|
+
pow,
|
|
113
|
+
/**
|
|
114
|
+
* Adds two PositiveFiniteNumber values.
|
|
115
|
+
*
|
|
116
|
+
* @param a The first PositiveFiniteNumber.
|
|
117
|
+
* @param b The second PositiveFiniteNumber.
|
|
118
|
+
* @returns `a + b` clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
119
|
+
*/
|
|
120
|
+
add,
|
|
121
|
+
/**
|
|
122
|
+
* Subtracts one PositiveFiniteNumber from another.
|
|
123
|
+
*
|
|
124
|
+
* @param a The minuend PositiveFiniteNumber.
|
|
125
|
+
* @param b The subtrahend PositiveFiniteNumber.
|
|
126
|
+
* @returns `a - b` clamped to (0, +∞) as a PositiveFiniteNumber (minimum
|
|
127
|
+
* MIN_VALUE).
|
|
128
|
+
*/
|
|
129
|
+
sub,
|
|
130
|
+
/**
|
|
131
|
+
* Multiplies two PositiveFiniteNumber values.
|
|
132
|
+
*
|
|
133
|
+
* @param a The first PositiveFiniteNumber.
|
|
134
|
+
* @param b The second PositiveFiniteNumber.
|
|
135
|
+
* @returns `a * b` clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
136
|
+
*/
|
|
137
|
+
mul,
|
|
138
|
+
/**
|
|
139
|
+
* Divides one PositiveFiniteNumber by another.
|
|
140
|
+
*
|
|
141
|
+
* @param a The dividend PositiveFiniteNumber.
|
|
142
|
+
* @param b The divisor PositiveFiniteNumber.
|
|
143
|
+
* @returns `a / b` clamped to (0, +∞) as a PositiveFiniteNumber.
|
|
144
|
+
*/
|
|
145
|
+
div
|
|
148
146
|
};
|
|
149
147
|
|
|
150
148
|
export { PositiveFiniteNumber, asPositiveFiniteNumber, isPositiveFiniteNumber };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positive-finite-number.mjs","sources":["../../../src/number/branded-types/positive-finite-number.mts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"positive-finite-number.mjs","sources":["../../../src/number/branded-types/positive-finite-number.mts"],"sourcesContent":["import {\n type PositiveInt,\n type PositiveFiniteNumber as TtfImported_PositiveFiniteNumber,\n type Uint,\n} from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type PositiveFiniteNumber = TtfImported_PositiveFiniteNumber;\n\ntype ElementType = PositiveFiniteNumber;\n\nconst typeNameInMessage = 'a positive finite number';\n\nconst {\n MIN_VALUE,\n add,\n castType,\n clamp,\n div,\n is,\n max: max_,\n min: min_,\n mul,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForFloat<\n ElementType,\n number,\n number\n>({\n MIN_VALUE: Number.MIN_VALUE,\n MAX_VALUE: Number.MAX_VALUE,\n typeNameInMessage,\n} as const);\n\nconst floor = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.RemoveNonZeroBrandKey<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>\n> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.floor(\n x,\n ) as TsDataForgeInternals.RefinedNumberUtils.RemoveNonZeroBrandKey<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>\n >;\n\nconst ceil = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.ceil(x) as TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>;\n\nconst round = (\n x: ElementType,\n): TsDataForgeInternals.RefinedNumberUtils.RemoveNonZeroBrandKey<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>\n> =>\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion\n Math.round(\n x,\n ) as TsDataForgeInternals.RefinedNumberUtils.RemoveNonZeroBrandKey<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>\n >;\n\nexpectType<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>,\n PositiveInt\n>('=');\n\nexpectType<\n TsDataForgeInternals.RefinedNumberUtils.RemoveNonZeroBrandKey<\n TsDataForgeInternals.RefinedNumberUtils.ToInt<ElementType>\n >,\n Uint\n>('=');\n\n/**\n * Checks if a number is a PositiveFiniteNumber (a finite number > 0).\n *\n * @param value The value to check.\n * @returns `true` if the value is a PositiveFiniteNumber, `false` otherwise.\n */\nexport const isPositiveFiniteNumber = is;\n\n/**\n * Casts a number to a PositiveFiniteNumber type.\n *\n * @param value The value to cast.\n * @returns The value as a PositiveFiniteNumber type.\n * @throws {TypeError} If the value is not a positive finite number.\n */\nexport const asPositiveFiniteNumber = castType;\n\n/**\n * Namespace providing type-safe arithmetic operations for positive finite\n * numbers.\n *\n * All operations maintain the positive constraint by clamping non-positive\n * results to MIN_VALUE, while ensuring results remain finite (excluding NaN and\n * Infinity). This type is useful for representing quantities that must always\n * be positive, such as probabilities, magnitudes, and physical measurements.\n */\nexport const PositiveFiniteNumber = {\n /**\n * Type guard to check if a value is a PositiveFiniteNumber.\n *\n * @param value The value to check.\n * @returns `true` if the value is a positive finite number, `false`\n * otherwise.\n */\n is,\n\n /**\n * The minimum value for a positive finite number.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * Returns the smaller of two PositiveFiniteNumber values.\n *\n * @param a The first PositiveFiniteNumber.\n * @param b The second PositiveFiniteNumber.\n * @returns The minimum value as a PositiveFiniteNumber.\n */\n min: min_,\n\n /**\n * Returns the larger of two PositiveFiniteNumber values.\n *\n * @param a The first PositiveFiniteNumber.\n * @param b The second PositiveFiniteNumber.\n * @returns The maximum value as a PositiveFiniteNumber.\n */\n max: max_,\n\n /**\n * Clamps a number to the positive finite range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to (0, +∞) as a PositiveFiniteNumber.\n */\n clamp,\n\n /**\n * Rounds down a PositiveFiniteNumber to the nearest integer.\n *\n * @param x The PositiveFiniteNumber to round down.\n * @returns The floor value as a Uint (can be 0).\n */\n floor,\n\n /**\n * Rounds up a PositiveFiniteNumber to the nearest integer.\n *\n * @param x The PositiveFiniteNumber to round up.\n * @returns The ceiling value as a PositiveInt (always >= 1).\n */\n ceil,\n\n /**\n * Rounds a PositiveFiniteNumber to the nearest integer.\n *\n * @param x The PositiveFiniteNumber to round.\n * @returns The rounded value as a Uint (can be 0 if x < 0.5).\n */\n round,\n\n /**\n * Generates a random PositiveFiniteNumber value.\n *\n * @returns A random positive finite number.\n */\n random,\n\n /**\n * Raises a PositiveFiniteNumber to the power of another PositiveFiniteNumber.\n *\n * @param a The base PositiveFiniteNumber.\n * @param b The exponent PositiveFiniteNumber.\n * @returns `a ** b` clamped to (0, +∞) as a PositiveFiniteNumber.\n */\n pow,\n\n /**\n * Adds two PositiveFiniteNumber values.\n *\n * @param a The first PositiveFiniteNumber.\n * @param b The second PositiveFiniteNumber.\n * @returns `a + b` clamped to (0, +∞) as a PositiveFiniteNumber.\n */\n add,\n\n /**\n * Subtracts one PositiveFiniteNumber from another.\n *\n * @param a The minuend PositiveFiniteNumber.\n * @param b The subtrahend PositiveFiniteNumber.\n * @returns `a - b` clamped to (0, +∞) as a PositiveFiniteNumber (minimum\n * MIN_VALUE).\n */\n sub,\n\n /**\n * Multiplies two PositiveFiniteNumber values.\n *\n * @param a The first PositiveFiniteNumber.\n * @param b The second PositiveFiniteNumber.\n * @returns `a * b` clamped to (0, +∞) as a PositiveFiniteNumber.\n */\n mul,\n\n /**\n * Divides one PositiveFiniteNumber by another.\n *\n * @param a The dividend PositiveFiniteNumber.\n * @param b The divisor PositiveFiniteNumber.\n * @returns `a / b` clamped to (0, +∞) as a PositiveFiniteNumber.\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof PositiveFiniteNumber,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'positive'\n >\n>('=');\n\nexpectType<\n typeof PositiveFiniteNumber,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<ElementType, 'positive'>\n>('<=');\n"],"names":[],"mappings":";;AAYA,MAAM,iBAAA,GAAoB,0BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,iBAAA,CAI1C;AAAA,EACA,WAAW,MAAA,CAAO,SAAA;AAAA,EAClB,WAAW,MAAA,CAAO,SAAA;AAAA,EAClB;AACF,CAAU,CAAA;AAEV,MAAM,QAAQ,CACZ,CAAA;AAAA;AAAA,EAKA,IAAA,CAAK,KAAA;AAAA,IACH;AAAA;AACF,CAAA;AAIF,MAAM,OAAO,CACX,CAAA;AAAA;AAAA,EAGA,IAAA,CAAK,KAAK,CAAC;AAAA,CAAA;AAEb,MAAM,QAAQ,CACZ,CAAA;AAAA;AAAA,EAKA,IAAA,CAAK,KAAA;AAAA,IACH;AAAA;AACF,CAAA;AAsBK,MAAM,sBAAA,GAAyB;AAS/B,MAAM,sBAAA,GAAyB;AAW/B,MAAM,oBAAA,GAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlC,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AACF;;;;"}
|
|
@@ -42,16 +42,16 @@ export declare const isPositiveInt: (a: number) => a is TtfImported_PositiveInt;
|
|
|
42
42
|
* @throws {TypeError} If the value is not a positive integer
|
|
43
43
|
*/
|
|
44
44
|
export declare const asPositiveInt: <N extends number>(x: N) => number & {
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly Int: true;
|
|
45
|
+
readonly "!=0": true;
|
|
46
|
+
readonly "<=0": false;
|
|
48
47
|
readonly "> -2^16": true;
|
|
49
48
|
readonly "> -2^32": true;
|
|
50
49
|
readonly ">= -2^15": true;
|
|
51
50
|
readonly ">= -2^31": true;
|
|
52
51
|
readonly ">=0": true;
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
52
|
+
readonly Finite: true;
|
|
53
|
+
readonly Int: true;
|
|
54
|
+
readonly NaNValue: false;
|
|
55
55
|
} & Readonly<{
|
|
56
56
|
'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
|
|
57
57
|
}> & N;
|
|
@@ -280,17 +280,17 @@ export declare const PositiveInt: {
|
|
|
280
280
|
* @param b - The divisor (positive integer, guaranteed non-zero)
|
|
281
281
|
* @returns `max(1, ⌊a / b⌋)` as a PositiveInt
|
|
282
282
|
*/
|
|
283
|
-
readonly div: (x: import("ts-type-forge").WithSmallInt<TtfImported_PositiveInt>, y: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|
|
284
|
-
readonly
|
|
285
|
-
readonly
|
|
286
|
-
readonly Int: true;
|
|
283
|
+
readonly div: (x: import("ts-type-forge").WithSmallInt<TtfImported_PositiveInt>, y: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | import("ts-type-forge").NormalizeBrandUnion<number & {
|
|
284
|
+
readonly "!=0": true;
|
|
285
|
+
readonly "<=0": false;
|
|
287
286
|
readonly "> -2^16": true;
|
|
288
287
|
readonly "> -2^32": true;
|
|
289
288
|
readonly ">= -2^15": true;
|
|
290
289
|
readonly ">= -2^31": true;
|
|
291
290
|
readonly ">=0": true;
|
|
292
|
-
readonly
|
|
293
|
-
readonly
|
|
291
|
+
readonly Finite: true;
|
|
292
|
+
readonly Int: true;
|
|
293
|
+
readonly NaNValue: false;
|
|
294
294
|
} & Readonly<{
|
|
295
295
|
'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
|
|
296
296
|
}>>) => TtfImported_PositiveInt;
|