ts-data-forge 6.9.1 → 6.9.3
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 +2 -14
- package/dist/array/impl/array-utils-creation.d.mts +2 -0
- package/dist/array/impl/array-utils-creation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-creation.mjs.map +1 -1
- package/dist/array/impl/array-utils-element-access.d.mts +3 -0
- package/dist/array/impl/array-utils-element-access.d.mts.map +1 -1
- package/dist/array/impl/array-utils-element-access.mjs.map +1 -1
- package/dist/array/impl/array-utils-iterators.d.mts +1 -0
- package/dist/array/impl/array-utils-iterators.d.mts.map +1 -1
- package/dist/array/impl/array-utils-iterators.mjs.map +1 -1
- package/dist/array/impl/array-utils-modification.d.mts +2 -0
- package/dist/array/impl/array-utils-modification.d.mts.map +1 -1
- package/dist/array/impl/array-utils-modification.mjs.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.d.mts +3 -0
- package/dist/array/impl/array-utils-reducing-value.d.mts.map +1 -1
- package/dist/array/impl/array-utils-reducing-value.mjs.map +1 -1
- package/dist/array/impl/array-utils-search.d.mts +2 -0
- package/dist/array/impl/array-utils-search.d.mts.map +1 -1
- package/dist/array/impl/array-utils-search.mjs.map +1 -1
- package/dist/array/impl/array-utils-set-op.d.mts +1 -0
- package/dist/array/impl/array-utils-set-op.d.mts.map +1 -1
- package/dist/array/impl/array-utils-set-op.mjs.map +1 -1
- package/dist/array/impl/array-utils-size.d.mts +2 -0
- package/dist/array/impl/array-utils-size.d.mts.map +1 -1
- package/dist/array/impl/array-utils-size.mjs +0 -19
- package/dist/array/impl/array-utils-size.mjs.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.d.mts +1 -0
- package/dist/array/impl/array-utils-slice-clamped.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slice-clamped.mjs.map +1 -1
- package/dist/array/impl/array-utils-slicing.d.mts +2 -0
- package/dist/array/impl/array-utils-slicing.d.mts.map +1 -1
- package/dist/array/impl/array-utils-slicing.mjs.map +1 -1
- package/dist/array/impl/array-utils-transformation.d.mts +2 -0
- package/dist/array/impl/array-utils-transformation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-transformation.mjs.map +1 -1
- package/dist/array/impl/array-utils-validation.d.mts +2 -0
- package/dist/array/impl/array-utils-validation.d.mts.map +1 -1
- package/dist/array/impl/array-utils-validation.mjs.map +1 -1
- package/dist/collections/imap-mapped.d.mts +2 -0
- package/dist/collections/imap-mapped.d.mts.map +1 -1
- package/dist/collections/imap-mapped.mjs.map +1 -1
- package/dist/collections/imap.d.mts +3 -0
- package/dist/collections/imap.d.mts.map +1 -1
- package/dist/collections/imap.mjs.map +1 -1
- package/dist/collections/iset-mapped.d.mts +2 -0
- package/dist/collections/iset-mapped.d.mts.map +1 -1
- package/dist/collections/iset-mapped.mjs.map +1 -1
- package/dist/collections/iset.d.mts +2 -0
- package/dist/collections/iset.d.mts.map +1 -1
- package/dist/collections/iset.mjs +0 -1
- package/dist/collections/iset.mjs.map +1 -1
- package/dist/collections/queue.d.mts +2 -0
- package/dist/collections/queue.d.mts.map +1 -1
- package/dist/collections/queue.mjs.map +1 -1
- package/dist/collections/stack.d.mts +2 -0
- package/dist/collections/stack.d.mts.map +1 -1
- package/dist/collections/stack.mjs.map +1 -1
- package/dist/expect-type.d.mts +1 -0
- package/dist/expect-type.d.mts.map +1 -1
- package/dist/expect-type.mjs.map +1 -1
- package/dist/functional/match.d.mts +1 -0
- package/dist/functional/match.d.mts.map +1 -1
- package/dist/functional/match.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.d.mts +1 -0
- package/dist/functional/optional/impl/optional-expect-to-be.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-expect-to-be.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-filter.d.mts +1 -0
- package/dist/functional/optional/impl/optional-filter.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-filter.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.d.mts +1 -0
- package/dist/functional/optional/impl/optional-flat-map.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-flat-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.d.mts +1 -0
- package/dist/functional/optional/impl/optional-from-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-from-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.d.mts +1 -0
- package/dist/functional/optional/impl/optional-is-none.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.d.mts +1 -0
- package/dist/functional/optional/impl/optional-is-optional.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-optional.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.d.mts +1 -0
- package/dist/functional/optional/impl/optional-is-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-is-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-map.d.mts +1 -0
- package/dist/functional/optional/impl/optional-map.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-map.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-none.d.mts +1 -0
- package/dist/functional/optional/impl/optional-none.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-none.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.d.mts +1 -0
- package/dist/functional/optional/impl/optional-or-else.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-or-else.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-some.d.mts +1 -0
- package/dist/functional/optional/impl/optional-some.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-some.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.d.mts +1 -0
- package/dist/functional/optional/impl/optional-to-nullable.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-to-nullable.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.d.mts +1 -0
- package/dist/functional/optional/impl/optional-unwrap-or.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-or.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts +1 -0
- package/dist/functional/optional/impl/optional-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap-throw.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.d.mts +2 -0
- package/dist/functional/optional/impl/optional-unwrap.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-unwrap.mjs.map +1 -1
- package/dist/functional/optional/impl/optional-zip.d.mts +2 -0
- package/dist/functional/optional/impl/optional-zip.d.mts.map +1 -1
- package/dist/functional/optional/impl/optional-zip.mjs +1 -0
- package/dist/functional/optional/impl/optional-zip.mjs.map +1 -1
- package/dist/functional/optional/impl/tag.d.mts +1 -0
- package/dist/functional/optional/impl/tag.d.mts.map +1 -1
- package/dist/functional/optional/impl/tag.mjs +0 -1
- package/dist/functional/optional/impl/tag.mjs.map +1 -1
- package/dist/functional/optional/impl/types.d.mts +2 -0
- package/dist/functional/optional/impl/types.d.mts.map +1 -1
- package/dist/functional/optional/index.d.mts +1 -1
- package/dist/functional/optional/index.d.mts.map +1 -1
- package/dist/functional/optional/optional.d.mts +16 -0
- package/dist/functional/optional/optional.d.mts.map +1 -0
- package/dist/functional/optional/optional.mjs +3 -0
- package/dist/functional/optional/optional.mjs.map +1 -0
- package/dist/functional/pipe.d.mts +2 -1
- package/dist/functional/pipe.d.mts.map +1 -1
- package/dist/functional/pipe.mjs.map +1 -1
- package/dist/functional/result/impl/result-err.d.mts +1 -0
- package/dist/functional/result/impl/result-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.d.mts +1 -0
- package/dist/functional/result/impl/result-expect-to-be.d.mts.map +1 -1
- package/dist/functional/result/impl/result-expect-to-be.mjs.map +1 -1
- package/dist/functional/result/impl/result-flat-map.d.mts +1 -0
- package/dist/functional/result/impl/result-flat-map.d.mts.map +1 -1
- package/dist/functional/result/impl/result-flat-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-fold.d.mts +1 -0
- package/dist/functional/result/impl/result-fold.d.mts.map +1 -1
- package/dist/functional/result/impl/result-fold.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-promise.d.mts +1 -0
- package/dist/functional/result/impl/result-from-promise.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-promise.mjs.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.d.mts +1 -0
- package/dist/functional/result/impl/result-from-throwable.d.mts.map +1 -1
- package/dist/functional/result/impl/result-from-throwable.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-err.d.mts +1 -0
- package/dist/functional/result/impl/result-is-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-ok.d.mts +1 -0
- package/dist/functional/result/impl/result-is-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-is-result.d.mts +1 -0
- package/dist/functional/result/impl/result-is-result.d.mts.map +1 -1
- package/dist/functional/result/impl/result-is-result.mjs.map +1 -1
- package/dist/functional/result/impl/result-map-err.d.mts +1 -0
- package/dist/functional/result/impl/result-map-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-map-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-map.d.mts +1 -0
- package/dist/functional/result/impl/result-map.d.mts.map +1 -1
- package/dist/functional/result/impl/result-map.mjs.map +1 -1
- package/dist/functional/result/impl/result-ok.d.mts +1 -0
- package/dist/functional/result/impl/result-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-or-else.d.mts +1 -0
- package/dist/functional/result/impl/result-or-else.d.mts.map +1 -1
- package/dist/functional/result/impl/result-or-else.mjs.map +1 -1
- package/dist/functional/result/impl/result-swap.d.mts +1 -0
- package/dist/functional/result/impl/result-swap.d.mts.map +1 -1
- package/dist/functional/result/impl/result-swap.mjs.map +1 -1
- package/dist/functional/result/impl/result-to-optional.d.mts +2 -0
- package/dist/functional/result/impl/result-to-optional.d.mts.map +1 -1
- package/dist/functional/result/impl/result-to-optional.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-err-or.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-err-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-err.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-err.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-ok-or.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok-or.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.d.mts +2 -0
- package/dist/functional/result/impl/result-unwrap-ok.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-ok.mjs.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.d.mts +1 -0
- package/dist/functional/result/impl/result-unwrap-throw.d.mts.map +1 -1
- package/dist/functional/result/impl/result-unwrap-throw.mjs.map +1 -1
- package/dist/functional/result/impl/result-zip.d.mts +1 -0
- package/dist/functional/result/impl/result-zip.d.mts.map +1 -1
- package/dist/functional/result/impl/result-zip.mjs.map +1 -1
- package/dist/functional/result/impl/tag.d.mts +1 -0
- package/dist/functional/result/impl/tag.d.mts.map +1 -1
- package/dist/functional/result/impl/tag.mjs +0 -1
- package/dist/functional/result/impl/tag.mjs.map +1 -1
- package/dist/functional/result/impl/types.d.mts +2 -0
- package/dist/functional/result/impl/types.d.mts.map +1 -1
- package/dist/functional/result/index.d.mts +1 -1
- package/dist/functional/result/index.d.mts.map +1 -1
- package/dist/functional/result/result.d.mts +16 -0
- package/dist/functional/result/result.d.mts.map +1 -0
- package/dist/functional/result/result.mjs +3 -0
- package/dist/functional/result/result.mjs.map +1 -0
- package/dist/functional/ternary-result/impl/tag.d.mts +1 -0
- package/dist/functional/ternary-result/impl/tag.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/tag.mjs +0 -1
- package/dist/functional/ternary-result/impl/tag.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-expect-to-be.d.mts.map +1 -1
- 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.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-flat-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-fold.d.mts.map +1 -1
- 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 +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-from-throwable.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-err.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ok.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-ternary-result.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-is-warn.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-err.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-err.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-map.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-map.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-ok.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-ok.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-or-else.d.mts.map +1 -1
- 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 +2 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err-or.d.mts.map +1 -1
- 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 +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-err.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok-or.d.mts.map +1 -1
- 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.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-ok.d.mts.map +1 -1
- 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 +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn-or.d.mts.map +1 -1
- 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 +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-unwrap-warn.d.mts +1 -0
- 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.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-warn.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-warn.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts +1 -0
- package/dist/functional/ternary-result/impl/ternary-result-zip.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/ternary-result-zip.mjs.map +1 -1
- package/dist/functional/ternary-result/impl/types.d.mts +1 -0
- package/dist/functional/ternary-result/impl/types.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.d.mts +1 -0
- package/dist/functional/ternary-result/impl/variant-name.d.mts.map +1 -1
- package/dist/functional/ternary-result/impl/variant-name.mjs.map +1 -1
- package/dist/functional/ternary-result/index.d.mts +1 -1
- package/dist/functional/ternary-result/index.d.mts.map +1 -1
- package/dist/functional/ternary-result/ternary-result.d.mts +40 -0
- package/dist/functional/ternary-result/ternary-result.d.mts.map +1 -0
- package/dist/functional/ternary-result/ternary-result.mjs +3 -0
- package/dist/functional/ternary-result/ternary-result.mjs.map +1 -0
- package/dist/guard/has-key.d.mts +1 -0
- package/dist/guard/has-key.d.mts.map +1 -1
- package/dist/guard/has-key.mjs.map +1 -1
- package/dist/guard/is-non-empty-string.d.mts +1 -0
- package/dist/guard/is-non-empty-string.d.mts.map +1 -1
- package/dist/guard/is-non-empty-string.mjs.map +1 -1
- package/dist/guard/is-primitive.d.mts +1 -0
- package/dist/guard/is-primitive.d.mts.map +1 -1
- package/dist/guard/is-primitive.mjs.map +1 -1
- package/dist/guard/is-record.d.mts +1 -0
- package/dist/guard/is-record.d.mts.map +1 -1
- package/dist/guard/is-record.mjs.map +1 -1
- package/dist/guard/is-type.d.mts +1 -0
- package/dist/guard/is-type.d.mts.map +1 -1
- package/dist/guard/is-type.mjs.map +1 -1
- package/dist/guard/key-is-in.d.mts +1 -0
- package/dist/guard/key-is-in.d.mts.map +1 -1
- package/dist/guard/key-is-in.mjs.map +1 -1
- package/dist/iterator/range.d.mts +2 -0
- package/dist/iterator/range.d.mts.map +1 -1
- package/dist/iterator/range.mjs.map +1 -1
- package/dist/json/json.d.mts +2 -0
- package/dist/json/json.d.mts.map +1 -1
- package/dist/json/json.mjs.map +1 -1
- package/dist/number/branded-types/finite-number.d.mts +15 -13
- package/dist/number/branded-types/finite-number.d.mts.map +1 -1
- package/dist/number/branded-types/finite-number.mjs.map +1 -1
- package/dist/number/branded-types/int.d.mts +15 -13
- package/dist/number/branded-types/int.d.mts.map +1 -1
- package/dist/number/branded-types/int.mjs.map +1 -1
- package/dist/number/branded-types/int16.d.mts +19 -17
- package/dist/number/branded-types/int16.d.mts.map +1 -1
- package/dist/number/branded-types/int16.mjs.map +1 -1
- package/dist/number/branded-types/int32.d.mts +19 -17
- package/dist/number/branded-types/int32.d.mts.map +1 -1
- package/dist/number/branded-types/int32.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-finite-number.d.mts +16 -14
- package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -1
- package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int16.d.mts +18 -16
- package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -1
- package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-negative-int32.d.mts +18 -16
- package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -1
- package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-finite-number.d.mts +16 -14
- package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int.d.mts +16 -14
- package/dist/number/branded-types/non-zero-int.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int16.d.mts +19 -17
- package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-int32.d.mts +19 -17
- package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-safe-int.d.mts +17 -15
- package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint16.d.mts +18 -16
- package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
- package/dist/number/branded-types/non-zero-uint32.d.mts +18 -16
- package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -1
- package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
- package/dist/number/branded-types/positive-finite-number.d.mts +16 -14
- package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -1
- package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
- package/dist/number/branded-types/positive-int.d.mts +18 -16
- package/dist/number/branded-types/positive-int.d.mts.map +1 -1
- package/dist/number/branded-types/positive-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-int16.d.mts +18 -16
- package/dist/number/branded-types/positive-int16.d.mts.map +1 -1
- package/dist/number/branded-types/positive-int16.mjs.map +1 -1
- package/dist/number/branded-types/positive-int32.d.mts +18 -16
- package/dist/number/branded-types/positive-int32.d.mts.map +1 -1
- package/dist/number/branded-types/positive-int32.mjs.map +1 -1
- package/dist/number/branded-types/positive-safe-int.d.mts +18 -16
- package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
- package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint16.d.mts +18 -16
- package/dist/number/branded-types/positive-uint16.d.mts.map +1 -1
- package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
- package/dist/number/branded-types/positive-uint32.d.mts +18 -16
- package/dist/number/branded-types/positive-uint32.d.mts.map +1 -1
- package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
- package/dist/number/branded-types/safe-int.d.mts +17 -15
- package/dist/number/branded-types/safe-int.d.mts.map +1 -1
- package/dist/number/branded-types/safe-int.mjs.map +1 -1
- package/dist/number/branded-types/safe-uint.d.mts +19 -17
- package/dist/number/branded-types/safe-uint.d.mts.map +1 -1
- package/dist/number/branded-types/safe-uint.mjs.map +1 -1
- package/dist/number/branded-types/uint.d.mts +18 -16
- package/dist/number/branded-types/uint.d.mts.map +1 -1
- package/dist/number/branded-types/uint.mjs.map +1 -1
- package/dist/number/branded-types/uint16.d.mts +18 -16
- package/dist/number/branded-types/uint16.d.mts.map +1 -1
- package/dist/number/branded-types/uint16.mjs.map +1 -1
- package/dist/number/branded-types/uint32.d.mts +18 -16
- package/dist/number/branded-types/uint32.d.mts.map +1 -1
- package/dist/number/branded-types/uint32.mjs.map +1 -1
- package/dist/number/enum/int8.d.mts +2 -0
- package/dist/number/enum/int8.d.mts.map +1 -1
- package/dist/number/enum/int8.mjs.map +1 -1
- package/dist/number/enum/uint8.d.mts +2 -0
- package/dist/number/enum/uint8.d.mts.map +1 -1
- package/dist/number/enum/uint8.mjs.map +1 -1
- package/dist/number/num.d.mts +2 -0
- package/dist/number/num.d.mts.map +1 -1
- package/dist/number/num.mjs.map +1 -1
- package/dist/number/refined-number-utils.d.mts +1 -0
- package/dist/number/refined-number-utils.d.mts.map +1 -1
- package/dist/number/refined-number-utils.mjs.map +1 -1
- package/dist/object/object.d.mts +1 -0
- package/dist/object/object.d.mts.map +1 -1
- package/dist/object/object.mjs.map +1 -1
- package/dist/others/cast-mutable.d.mts +1 -0
- package/dist/others/cast-mutable.d.mts.map +1 -1
- package/dist/others/cast-mutable.mjs +3 -1
- package/dist/others/cast-mutable.mjs.map +1 -1
- package/dist/others/cast-readonly.d.mts +1 -0
- package/dist/others/cast-readonly.d.mts.map +1 -1
- package/dist/others/cast-readonly.mjs +3 -1
- package/dist/others/cast-readonly.mjs.map +1 -1
- package/dist/others/memoize-function.d.mts +1 -0
- package/dist/others/memoize-function.d.mts.map +1 -1
- package/dist/others/memoize-function.mjs.map +1 -1
- package/dist/promise/promise.d.mts +1 -0
- package/dist/promise/promise.d.mts.map +1 -1
- package/dist/types.d.mts +1 -2
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +21 -21
- package/src/array/impl/array-utils-creation.mts +19 -0
- package/src/array/impl/array-utils-creation.test.mts +2 -0
- package/src/array/impl/array-utils-element-access.mts +7 -0
- package/src/array/impl/array-utils-element-access.test.mts +2 -0
- package/src/array/impl/array-utils-iterators.mts +1 -0
- package/src/array/impl/array-utils-iterators.test.mts +1 -0
- package/src/array/impl/array-utils-modification.mts +11 -0
- package/src/array/impl/array-utils-modification.test.mts +1 -0
- package/src/array/impl/array-utils-overload-type-error.test.mts +1 -0
- package/src/array/impl/array-utils-reducing-value.mts +7 -0
- package/src/array/impl/array-utils-reducing-value.test.mts +2 -0
- package/src/array/impl/array-utils-search.mts +5 -0
- package/src/array/impl/array-utils-search.test.mts +1 -0
- package/src/array/impl/array-utils-set-op.mts +2 -0
- package/src/array/impl/array-utils-size.mts +7 -0
- package/src/array/impl/array-utils-slice-clamped.mts +1 -0
- package/src/array/impl/array-utils-slicing.mts +2 -0
- package/src/array/impl/array-utils-transformation.mts +17 -0
- package/src/array/impl/array-utils-transformation.test.mts +1 -0
- package/src/array/impl/array-utils-validation.mts +8 -0
- package/src/array/impl/array-utils-validation.test.mts +1 -0
- package/src/collections/imap-mapped.mts +1 -0
- package/src/collections/imap-mapped.test.mts +1 -0
- package/src/collections/imap.mts +2 -0
- package/src/collections/iset-mapped.mts +2 -0
- package/src/collections/iset.mts +2 -1
- package/src/collections/iset.test.mts +4 -2
- package/src/collections/queue.mts +1 -0
- package/src/collections/stack.mts +1 -0
- package/src/collections/stack.test.mts +1 -0
- package/src/expect-type.mts +2 -0
- package/src/functional/match.mts +7 -0
- package/src/functional/match.test.mts +1 -0
- package/src/functional/optional/impl/optional-expect-to-be.mts +1 -0
- package/src/functional/optional/impl/optional-filter.mts +1 -0
- package/src/functional/optional/impl/optional-flat-map.mts +1 -0
- package/src/functional/optional/impl/optional-from-nullable.mts +1 -0
- package/src/functional/optional/impl/optional-is-none.mts +1 -0
- package/src/functional/optional/impl/optional-is-optional.mts +1 -0
- package/src/functional/optional/impl/optional-is-some.mts +1 -0
- package/src/functional/optional/impl/optional-map.mts +1 -0
- package/src/functional/optional/impl/optional-none.mts +1 -0
- package/src/functional/optional/impl/optional-or-else.mts +1 -0
- package/src/functional/optional/impl/optional-some.mts +1 -0
- package/src/functional/optional/impl/optional-to-nullable.mts +1 -0
- package/src/functional/optional/impl/optional-unwrap-or.mts +1 -0
- package/src/functional/optional/impl/optional-unwrap-throw.mts +1 -0
- package/src/functional/optional/impl/optional-unwrap.mts +2 -0
- package/src/functional/optional/impl/optional-zip.mts +2 -0
- package/src/functional/optional/impl/tag.mts +2 -0
- package/src/functional/optional/impl/types.mts +3 -0
- package/src/functional/optional/index.mts +1 -1
- package/src/functional/optional/optional.mts +19 -0
- package/src/functional/optional.test.mts +1 -0
- package/src/functional/pipe.mts +2 -1
- package/src/functional/pipe.test.mts +1 -0
- package/src/functional/result/impl/result-err.mts +1 -0
- package/src/functional/result/impl/result-expect-to-be.mts +1 -0
- package/src/functional/result/impl/result-flat-map.mts +2 -0
- package/src/functional/result/impl/result-fold.mts +1 -0
- package/src/functional/result/impl/result-from-promise.mts +2 -0
- package/src/functional/result/impl/result-from-throwable.mts +1 -0
- package/src/functional/result/impl/result-is-err.mts +1 -0
- package/src/functional/result/impl/result-is-ok.mts +1 -0
- package/src/functional/result/impl/result-is-result.mts +1 -0
- package/src/functional/result/impl/result-map-err.mts +2 -0
- package/src/functional/result/impl/result-map.mts +2 -0
- package/src/functional/result/impl/result-ok.mts +1 -0
- package/src/functional/result/impl/result-or-else.mts +1 -0
- package/src/functional/result/impl/result-swap.mts +1 -0
- package/src/functional/result/impl/result-to-optional.mts +1 -0
- package/src/functional/result/impl/result-unwrap-err-or.mts +1 -0
- package/src/functional/result/impl/result-unwrap-err-throw.mts +1 -0
- package/src/functional/result/impl/result-unwrap-err.mts +1 -0
- package/src/functional/result/impl/result-unwrap-ok-or.mts +1 -0
- package/src/functional/result/impl/result-unwrap-ok.mts +2 -0
- package/src/functional/result/impl/result-unwrap-throw.mts +1 -0
- package/src/functional/result/impl/result-zip.mts +1 -0
- package/src/functional/result/impl/tag.mts +2 -0
- package/src/functional/result/impl/types.mts +3 -0
- package/src/functional/result/index.mts +1 -1
- package/src/functional/result/result.mts +19 -0
- package/src/functional/result.test.mts +1 -0
- package/src/functional/ternary-result/impl/tag.mts +6 -0
- package/src/functional/ternary-result/impl/ternary-result-err.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-expect-to-be.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-flat-map.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-fold.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-from-promise.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-from-throwable.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-is-err.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-is-ok.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-is-ternary-result.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-is-warn.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-map-err.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-map-warn.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-map.mts +5 -0
- package/src/functional/ternary-result/impl/ternary-result-ok.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-or-else.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-to-optional.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-or.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-err.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok-or.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-ok.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-or.mts +4 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn-throw.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-unwrap-warn.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-warn.mts +1 -0
- package/src/functional/ternary-result/impl/ternary-result-zip.mts +1 -0
- package/src/functional/ternary-result/impl/types.mts +7 -0
- package/src/functional/ternary-result/impl/variant-name.mts +1 -0
- package/src/functional/ternary-result/index.mts +1 -1
- package/src/functional/ternary-result/ternary-result.mts +54 -0
- package/src/guard/has-key.mts +2 -0
- package/src/guard/has-key.test.mts +4 -0
- package/src/guard/is-non-empty-string.mts +2 -0
- package/src/guard/is-non-null-object.test.mts +1 -0
- package/src/guard/is-primitive.mts +1 -0
- package/src/guard/is-record.mts +1 -0
- package/src/guard/is-record.test.mts +1 -0
- package/src/guard/is-type.mts +2 -0
- package/src/guard/key-is-in.mts +2 -0
- package/src/guard/key-is-in.test.mts +2 -0
- package/src/iterator/range.mts +6 -0
- package/src/json/json.mts +5 -0
- package/src/number/branded-types/finite-number.mts +7 -0
- package/src/number/branded-types/int.mts +3 -0
- package/src/number/branded-types/int16.mts +3 -0
- package/src/number/branded-types/int32.mts +3 -0
- package/src/number/branded-types/non-negative-finite-number.mts +6 -0
- package/src/number/branded-types/non-negative-int16.mts +3 -0
- package/src/number/branded-types/non-negative-int32.mts +3 -0
- package/src/number/branded-types/non-zero-finite-number.mts +8 -0
- package/src/number/branded-types/non-zero-int.mts +3 -0
- package/src/number/branded-types/non-zero-int16.mts +3 -0
- package/src/number/branded-types/non-zero-int32.mts +3 -0
- package/src/number/branded-types/non-zero-safe-int.mts +7 -0
- package/src/number/branded-types/non-zero-uint16.mts +3 -0
- package/src/number/branded-types/non-zero-uint32.mts +3 -0
- package/src/number/branded-types/positive-finite-number.mts +7 -0
- package/src/number/branded-types/positive-int.mts +3 -0
- package/src/number/branded-types/positive-int16.mts +3 -0
- package/src/number/branded-types/positive-int32.mts +3 -0
- package/src/number/branded-types/positive-safe-int.mts +6 -0
- package/src/number/branded-types/positive-uint16.mts +3 -0
- package/src/number/branded-types/positive-uint32.mts +3 -0
- package/src/number/branded-types/safe-int.mts +6 -0
- package/src/number/branded-types/safe-uint.mts +3 -0
- package/src/number/branded-types/uint.mts +3 -0
- package/src/number/branded-types/uint16.mts +3 -0
- package/src/number/branded-types/uint32.mts +3 -0
- package/src/number/enum/int8.mts +7 -0
- package/src/number/enum/uint8.mts +3 -0
- package/src/number/num.mts +18 -0
- package/src/number/num.test.mts +1 -0
- package/src/number/refined-number-utils.mts +15 -0
- package/src/object/object.mts +13 -0
- package/src/object/object.test.mts +5 -0
- package/src/others/cast-mutable.mts +3 -0
- package/src/others/cast-readonly.mts +3 -0
- package/src/others/debounce-function.test.mts +0 -2
- package/src/others/fast-deep-equal.test.mts +1 -1
- package/src/others/map-nullable.test.mts +1 -0
- package/src/others/memoize-function.mts +2 -0
- package/src/types.mts +131 -0
- package/dist/globals.d.mts +0 -194
- package/src/globals.d.mts +0 -194
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonZeroInt32 as TtfImported_NonZeroInt32 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type NonZeroInt32 = TtfImported_NonZeroInt32;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonZeroInt32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-zero integer in [-2^31, 2^31)';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type SafeInt,
|
|
3
|
+
type SafeUint,
|
|
4
|
+
type NonZeroSafeInt as TtfImported_NonZeroSafeInt,
|
|
5
|
+
} from 'ts-type-forge';
|
|
1
6
|
import { expectType } from '../../expect-type.mjs';
|
|
2
7
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
8
|
|
|
9
|
+
export type NonZeroSafeInt = TtfImported_NonZeroSafeInt;
|
|
10
|
+
|
|
4
11
|
type ElementType = NonZeroSafeInt;
|
|
5
12
|
|
|
6
13
|
const typeNameInMessage = 'a non-zero safe integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonZeroUint16 as TtfImported_NonZeroUint16 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type NonZeroUint16 = TtfImported_NonZeroUint16;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonZeroUint16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-zero integer in [1, 2^16)';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonZeroUint32 as TtfImported_NonZeroUint32 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type NonZeroUint32 = TtfImported_NonZeroUint32;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonZeroUint32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-zero integer in [1, 2^32)';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type PositiveInt,
|
|
3
|
+
type PositiveFiniteNumber as TtfImported_PositiveFiniteNumber,
|
|
4
|
+
type Uint,
|
|
5
|
+
} from 'ts-type-forge';
|
|
1
6
|
import { expectType } from '../../expect-type.mjs';
|
|
2
7
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
8
|
|
|
9
|
+
export type PositiveFiniteNumber = TtfImported_PositiveFiniteNumber;
|
|
10
|
+
|
|
4
11
|
type ElementType = PositiveFiniteNumber;
|
|
5
12
|
|
|
6
13
|
const typeNameInMessage = 'a positive finite number';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type PositiveInt as TtfImported_PositiveInt } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type PositiveInt = TtfImported_PositiveInt;
|
|
6
|
+
|
|
4
7
|
type ElementType = PositiveInt;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a positive integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type PositiveInt16 as TtfImported_PositiveInt16 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type PositiveInt16 = TtfImported_PositiveInt16;
|
|
6
|
+
|
|
4
7
|
type ElementType = PositiveInt16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a positive integer in [1, 2^15)';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type PositiveInt32 as TtfImported_PositiveInt32 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type PositiveInt32 = TtfImported_PositiveInt32;
|
|
6
|
+
|
|
4
7
|
type ElementType = PositiveInt32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a positive integer in [1, 2^31)';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type SafeUint,
|
|
3
|
+
type PositiveSafeInt as TtfImported_PositiveSafeInt,
|
|
4
|
+
} from 'ts-type-forge';
|
|
1
5
|
import { expectType } from '../../expect-type.mjs';
|
|
2
6
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
7
|
|
|
8
|
+
export type PositiveSafeInt = TtfImported_PositiveSafeInt;
|
|
9
|
+
|
|
4
10
|
type ElementType = PositiveSafeInt;
|
|
5
11
|
|
|
6
12
|
const typeNameInMessage = 'a positive safe integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type PositiveUint16 as TtfImported_PositiveUint16 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type PositiveUint16 = TtfImported_PositiveUint16;
|
|
6
|
+
|
|
4
7
|
type ElementType = PositiveUint16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a positive integer in [1, 2^16)';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type PositiveUint32 as TtfImported_PositiveUint32 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type PositiveUint32 = TtfImported_PositiveUint32;
|
|
6
|
+
|
|
4
7
|
type ElementType = PositiveUint32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a positive integer in [1, 2^32)';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type SafeUint,
|
|
3
|
+
type SafeInt as TtfImported_SafeInt,
|
|
4
|
+
} from 'ts-type-forge';
|
|
1
5
|
import { expectType } from '../../expect-type.mjs';
|
|
2
6
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
7
|
|
|
8
|
+
export type SafeInt = TtfImported_SafeInt;
|
|
9
|
+
|
|
4
10
|
type ElementType = SafeInt;
|
|
5
11
|
|
|
6
12
|
const typeNameInMessage = 'a safe integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type SafeUint as TtfImported_SafeUint } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type SafeUint = TtfImported_SafeUint;
|
|
6
|
+
|
|
4
7
|
type ElementType = SafeUint;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative safe integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Uint as TtfImported_Uint } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type Uint = TtfImported_Uint;
|
|
6
|
+
|
|
4
7
|
type ElementType = Uint;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Uint16 as TtfImported_Uint16 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type Uint16 = TtfImported_Uint16;
|
|
6
|
+
|
|
4
7
|
type ElementType = Uint16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative integer less than 2^16';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Uint32 as TtfImported_Uint32 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type Uint32 = TtfImported_Uint32;
|
|
6
|
+
|
|
4
7
|
type ElementType = Uint32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative integer less than 2^32';
|
package/src/number/enum/int8.mts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type AbsoluteValue,
|
|
3
|
+
type Int16,
|
|
4
|
+
type Int8 as TtfImported_Int8,
|
|
5
|
+
} from 'ts-type-forge';
|
|
1
6
|
import { expectType } from '../../expect-type.mjs';
|
|
2
7
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
8
|
|
|
9
|
+
export type Int8 = TtfImported_Int8;
|
|
10
|
+
|
|
4
11
|
const typeNameInMessage = 'an integer in [-128, 127]';
|
|
5
12
|
|
|
6
13
|
const {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Uint8 as TtfImported_Uint8, type Uint16 } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
4
|
|
|
5
|
+
export type Uint8 = TtfImported_Uint8;
|
|
6
|
+
|
|
4
7
|
const typeNameInMessage = 'an non-negative integer less than 256';
|
|
5
8
|
|
|
6
9
|
const {
|
package/src/number/num.mts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Decrement,
|
|
3
|
+
type Increment,
|
|
4
|
+
type Index,
|
|
5
|
+
type Int,
|
|
6
|
+
type Min,
|
|
7
|
+
type NaNType,
|
|
8
|
+
type NegativeIndex,
|
|
9
|
+
type NonNegativeNumber,
|
|
10
|
+
type NonZeroNumber,
|
|
11
|
+
type PositiveNumber,
|
|
12
|
+
type PositiveSafeIntWithSmallInt,
|
|
13
|
+
type RelaxedExclude,
|
|
14
|
+
type SmallInt,
|
|
15
|
+
type SmallUint,
|
|
16
|
+
type UnknownBrand,
|
|
17
|
+
} from 'ts-type-forge';
|
|
1
18
|
import { expectType } from '../expect-type.mjs';
|
|
19
|
+
import { type SmallPositiveInt } from '../types.mjs';
|
|
2
20
|
|
|
3
21
|
/**
|
|
4
22
|
* Namespace providing utility functions for number manipulation and validation.
|
package/src/number/num.test.mts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Brand,
|
|
3
|
+
type ChangeBaseBrand,
|
|
4
|
+
type GetBrandValuePart,
|
|
5
|
+
type Int,
|
|
6
|
+
type IntersectBrand,
|
|
7
|
+
type NonNegativeNumber,
|
|
8
|
+
type NonZeroNumber,
|
|
9
|
+
type RelaxedExclude,
|
|
10
|
+
type TypeEq,
|
|
11
|
+
type UnknownBrand,
|
|
12
|
+
type UnwrapBrandFalseKeys,
|
|
13
|
+
type UnwrapBrandTrueKeys,
|
|
14
|
+
type WithSmallInt,
|
|
15
|
+
} from 'ts-type-forge';
|
|
1
16
|
import { expectType } from '../expect-type.mjs';
|
|
2
17
|
import { pipe } from '../functional/index.mjs';
|
|
3
18
|
import { Num } from './num.mjs';
|
package/src/object/object.mts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ArrayElement,
|
|
3
|
+
type Decrement,
|
|
4
|
+
type DeepOmit,
|
|
5
|
+
type DeepPick,
|
|
6
|
+
type IsFixedLengthList,
|
|
7
|
+
type IsUnion,
|
|
8
|
+
type List,
|
|
9
|
+
type ReadonlyRecord,
|
|
10
|
+
type RelaxedPick,
|
|
11
|
+
type TypeEq,
|
|
12
|
+
type UnknownRecord,
|
|
13
|
+
} from 'ts-type-forge';
|
|
1
14
|
import { Arr } from '../array/index.mjs';
|
|
2
15
|
import { hasKey, isRecord } from '../guard/index.mjs';
|
|
3
16
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type DeepMutable, type Mutable } from 'ts-type-forge';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Casts a readonly type `T` to its `Mutable<T>` equivalent.
|
|
3
5
|
*
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
* @see castReadonly - For the opposite operation
|
|
14
16
|
*/
|
|
15
17
|
export const castMutable = <T,>(readonlyValue: T): Mutable<T> =>
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
16
19
|
readonlyValue as Mutable<T>;
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type DeepReadonly } from 'ts-type-forge';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Casts a mutable type `T` to its `Readonly<T>` equivalent.
|
|
3
5
|
*
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
* @see castMutable - For the opposite operation (use with caution)
|
|
14
16
|
*/
|
|
15
17
|
export const castReadonly = <T,>(mutable: T): Readonly<T> =>
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
16
19
|
mutable as Readonly<T>;
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -16,7 +16,6 @@ describe(debounce, () => {
|
|
|
16
16
|
test('should delay the execution of the function', () => {
|
|
17
17
|
const func = vi.fn();
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/strict-void-return
|
|
20
19
|
const debouncedFunc = debounce(func, 100);
|
|
21
20
|
|
|
22
21
|
debouncedFunc();
|
|
@@ -35,7 +34,6 @@ describe(debounce, () => {
|
|
|
35
34
|
test('should only execute the function once after multiple rapid calls', () => {
|
|
36
35
|
const func = vi.fn();
|
|
37
36
|
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/strict-void-return
|
|
39
37
|
const debouncedFunc = debounce(func, 100);
|
|
40
38
|
|
|
41
39
|
debouncedFunc();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/* eslint-disable require-unicode-regexp */
|
|
4
4
|
/* eslint-disable no-restricted-globals */
|
|
5
5
|
/* eslint-disable functional/no-class-inheritance */
|
|
6
|
-
|
|
7
6
|
import * as React from 'react';
|
|
7
|
+
import { type ReadonlyRecord } from 'ts-type-forge';
|
|
8
8
|
import { fastDeepEqual } from './fast-deep-equal.mjs';
|
|
9
9
|
|
|
10
10
|
const fastDeepEqualUntyped = (a: any, b: any): boolean => fastDeepEqual(a, b);
|
package/src/types.mts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type IndexOfTuple,
|
|
3
|
+
type IntersectBrand,
|
|
4
|
+
type IsFixedLengthList,
|
|
5
|
+
type NegativeIndexOfTuple,
|
|
6
|
+
type NegativeInt32,
|
|
7
|
+
type NormalizeBrandUnion,
|
|
8
|
+
type PositiveInt,
|
|
9
|
+
type PositiveNumber,
|
|
10
|
+
type Primitive,
|
|
11
|
+
type SafeInt,
|
|
12
|
+
type SafeUint,
|
|
13
|
+
type Uint32,
|
|
14
|
+
type WithSmallInt,
|
|
15
|
+
} from 'ts-type-forge';
|
|
16
|
+
|
|
17
|
+
export type SmallPositiveInt = WithSmallInt<PositiveInt>;
|
|
18
|
+
|
|
19
|
+
/** Represents the type of keys that can be used in a standard JavaScript Map. */
|
|
20
|
+
export type MapSetKeyType = Primitive;
|
|
21
|
+
|
|
22
|
+
export type ArrayIndex<Ar extends readonly unknown[]> =
|
|
23
|
+
IsFixedLengthList<Ar> extends true ? IndexOfTuple<Ar> : SizeType.Arr;
|
|
24
|
+
|
|
25
|
+
export type ArgArrayIndex<Ar extends readonly unknown[]> =
|
|
26
|
+
IsFixedLengthList<Ar> extends true ? IndexOfTuple<Ar> : SizeType.ArgArr;
|
|
27
|
+
|
|
28
|
+
export type ArgArrayIndexWithNegative<Ar extends readonly unknown[]> =
|
|
29
|
+
IsFixedLengthList<Ar> extends true
|
|
30
|
+
? IndexOfTuple<readonly [...Ar, 0]> | NegativeIndexOfTuple<Ar>
|
|
31
|
+
: SizeType.ArgArrWithNegative;
|
|
32
|
+
|
|
33
|
+
// https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/length
|
|
34
|
+
// https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/length
|
|
35
|
+
// Max array length : 2^32 - 1
|
|
36
|
+
// Max string length : 2^53 - 1
|
|
37
|
+
|
|
38
|
+
export namespace SizeType {
|
|
39
|
+
export type Arr = Uint32;
|
|
40
|
+
|
|
41
|
+
export type TypedArray = SafeUint;
|
|
42
|
+
|
|
43
|
+
export type Str = SafeUint;
|
|
44
|
+
|
|
45
|
+
export type ArrSearchResult = Arr | -1;
|
|
46
|
+
|
|
47
|
+
export type TypedArraySearchResult = TypedArray | -1;
|
|
48
|
+
|
|
49
|
+
export type StrSearchResult = Str | -1;
|
|
50
|
+
|
|
51
|
+
export type ArgArr = WithSmallInt<Arr>;
|
|
52
|
+
|
|
53
|
+
export type ArgTypedArray = WithSmallInt<TypedArray>;
|
|
54
|
+
|
|
55
|
+
export type ArgStr = WithSmallInt<Str>;
|
|
56
|
+
|
|
57
|
+
export type ArgArrWithNegative = WithSmallInt<
|
|
58
|
+
NormalizeBrandUnion<NegativeInt32 | Arr>
|
|
59
|
+
>;
|
|
60
|
+
|
|
61
|
+
export type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
|
|
62
|
+
|
|
63
|
+
export type ArgStrWithNegative = WithSmallInt<SafeInt>;
|
|
64
|
+
|
|
65
|
+
export type ArgArrPositive = WithSmallInt<
|
|
66
|
+
IntersectBrand<PositiveNumber, Arr>
|
|
67
|
+
>;
|
|
68
|
+
|
|
69
|
+
export type ArgTypedArrayPositive = WithSmallInt<
|
|
70
|
+
IntersectBrand<PositiveNumber, TypedArray>
|
|
71
|
+
>;
|
|
72
|
+
|
|
73
|
+
export type ArgStrPositive = WithSmallInt<
|
|
74
|
+
IntersectBrand<PositiveNumber, Str>
|
|
75
|
+
>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// #region Optional
|
|
79
|
+
/**
|
|
80
|
+
* Represents the 'Some' variant of an Optional, containing a value.
|
|
81
|
+
*
|
|
82
|
+
* @template S The type of the contained value.
|
|
83
|
+
*/
|
|
84
|
+
export type Some<S> = Readonly<{
|
|
85
|
+
/** @internal Discriminant property for the 'Some' type. */
|
|
86
|
+
$$tag: 'ts-data-forge::Optional.some';
|
|
87
|
+
|
|
88
|
+
/** The contained value. */
|
|
89
|
+
value: S;
|
|
90
|
+
}>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Represents the 'None' variant of an Optional, indicating the absence
|
|
94
|
+
* of a value.
|
|
95
|
+
*/
|
|
96
|
+
export type None = Readonly<{
|
|
97
|
+
/** @internal Discriminant property for the 'None' type. */
|
|
98
|
+
$$tag: 'ts-data-forge::Optional.none';
|
|
99
|
+
}>;
|
|
100
|
+
|
|
101
|
+
// #endregion Optional
|
|
102
|
+
|
|
103
|
+
// #region Result
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Represents a `Result` that is a success, containing a value.
|
|
107
|
+
*
|
|
108
|
+
* @template S The type of the success value.
|
|
109
|
+
*/
|
|
110
|
+
export type Ok<S> = Readonly<{
|
|
111
|
+
/** @internal Discriminant property for the 'Ok' type. */
|
|
112
|
+
$$tag: 'ts-data-forge::Result.ok';
|
|
113
|
+
|
|
114
|
+
/** The success value. */
|
|
115
|
+
value: S;
|
|
116
|
+
}>;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Represents a `Result` that is an error, containing an error value.
|
|
120
|
+
*
|
|
121
|
+
* @template E The type of the error value.
|
|
122
|
+
*/
|
|
123
|
+
export type Err<E> = Readonly<{
|
|
124
|
+
/** @internal Discriminant property for the 'Err' type. */
|
|
125
|
+
$$tag: 'ts-data-forge::Result.err';
|
|
126
|
+
|
|
127
|
+
/** The error value. */
|
|
128
|
+
value: E;
|
|
129
|
+
}>;
|
|
130
|
+
|
|
131
|
+
// #endregion Result
|