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,3 +1,4 @@
|
|
|
1
|
+
import { type SafeInt, type SafeUint, type SmallUint } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { range as rangeIterator } from '../../iterator/index.mjs';
|
|
3
4
|
import {
|
|
@@ -6,6 +7,7 @@ import {
|
|
|
6
7
|
asSafeUint,
|
|
7
8
|
asUint32,
|
|
8
9
|
} from '../../number/index.mjs';
|
|
10
|
+
import { type SizeType } from '../../types.mjs';
|
|
9
11
|
import {
|
|
10
12
|
copy,
|
|
11
13
|
create,
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { type NonEmptyArray } from 'ts-type-forge';
|
|
1
2
|
import { Optional, pipe } from '../../functional/index.mjs';
|
|
3
|
+
import {
|
|
4
|
+
type ArgArrayIndexWithNegative,
|
|
5
|
+
type None,
|
|
6
|
+
type SizeType,
|
|
7
|
+
type Some,
|
|
8
|
+
} from '../../types.mjs';
|
|
2
9
|
|
|
3
10
|
/**
|
|
4
11
|
* Safely retrieves an element at a given index from an array, returning an Optional.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type MutableNonEmptyArray } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../../expect-type.mjs';
|
|
2
3
|
import { Optional } from '../../functional/index.mjs';
|
|
3
4
|
import { asInt32, asUint32 } from '../../number/index.mjs';
|
|
5
|
+
import { type None, type Some } from '../../types.mjs';
|
|
4
6
|
import { at, head, last } from './array-utils-element-access.mjs';
|
|
5
7
|
|
|
6
8
|
describe('Arr element access', () => {
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ArrayOfLength,
|
|
3
|
+
type Increment,
|
|
4
|
+
type IsFixedLengthList,
|
|
5
|
+
type NonEmptyArray,
|
|
6
|
+
} from 'ts-type-forge';
|
|
1
7
|
import { asPositiveUint32 } from '../../number/index.mjs';
|
|
2
8
|
import { castMutable } from '../../others/index.mjs';
|
|
9
|
+
import {
|
|
10
|
+
type ArgArrayIndex,
|
|
11
|
+
type ArgArrayIndexWithNegative,
|
|
12
|
+
type SizeType,
|
|
13
|
+
} from '../../types.mjs';
|
|
3
14
|
import { copy, create } from './array-utils-creation.mjs';
|
|
4
15
|
|
|
5
16
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expectType } from '../../expect-type.mjs';
|
|
2
2
|
import { pipe } from '../../functional/index.mjs';
|
|
3
|
+
import { type SizeType } from '../../types.mjs';
|
|
3
4
|
import { range } from './array-utils-creation.mjs';
|
|
4
5
|
import { findIndex } from './array-utils-search.mjs';
|
|
5
6
|
import { filterNot, partition } from './array-utils-transformation.mjs';
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { isError } from '@sindresorhus/is';
|
|
2
|
+
import { type Int, type NonEmptyArray, type Uint } from 'ts-type-forge';
|
|
2
3
|
import { IMap } from '../../collections/index.mjs';
|
|
3
4
|
import { Optional, Result } from '../../functional/index.mjs';
|
|
4
5
|
import { isString, isUndefined } from '../../guard/index.mjs';
|
|
5
6
|
import { asUint32, Num, Uint32 } from '../../number/index.mjs';
|
|
6
7
|
import { unknownToString } from '../../others/index.mjs';
|
|
8
|
+
import {
|
|
9
|
+
type ArrayIndex,
|
|
10
|
+
type MapSetKeyType,
|
|
11
|
+
type SizeType,
|
|
12
|
+
type Some,
|
|
13
|
+
} from '../../types.mjs';
|
|
7
14
|
import { isNonEmpty } from './array-utils-validation.mjs';
|
|
8
15
|
|
|
9
16
|
/**
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type Uint32 } from 'ts-type-forge';
|
|
1
2
|
import { IMap } from '../../collections/index.mjs';
|
|
2
3
|
import { expectType } from '../../expect-type.mjs';
|
|
3
4
|
import { Optional, Result } from '../../functional/index.mjs';
|
|
5
|
+
import { type Some } from '../../types.mjs';
|
|
4
6
|
import {
|
|
5
7
|
count,
|
|
6
8
|
countBy,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { expectType } from '../../expect-type.mjs';
|
|
2
2
|
import { Optional, pipe } from '../../functional/index.mjs';
|
|
3
3
|
import { asUint32 } from '../../number/index.mjs';
|
|
4
|
+
import {
|
|
5
|
+
type ArgArrayIndexWithNegative,
|
|
6
|
+
type ArrayIndex,
|
|
7
|
+
type SizeType,
|
|
8
|
+
} from '../../types.mjs';
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* Finds the first element that satisfies a predicate.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type IntersectBrand,
|
|
3
|
+
type NonEmptyArray,
|
|
4
|
+
type PositiveNumber,
|
|
5
|
+
} from 'ts-type-forge';
|
|
1
6
|
/**
|
|
2
7
|
* Returns the size (length) of an array.
|
|
3
8
|
*
|
|
@@ -17,6 +22,8 @@
|
|
|
17
22
|
* assert.isTrue(sizeOfLetters === 0);
|
|
18
23
|
* ```
|
|
19
24
|
*/
|
|
25
|
+
import { type SizeType } from '../../types.mjs';
|
|
26
|
+
|
|
20
27
|
export const size = <const Ar extends readonly unknown[]>(
|
|
21
28
|
array: Ar,
|
|
22
29
|
): Ar extends NonEmptyArray<unknown>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type List, type NonEmptyArray, type SmallUint } from 'ts-type-forge';
|
|
1
2
|
import { Uint32 } from '../../number/index.mjs';
|
|
3
|
+
import { type SizeType } from '../../types.mjs';
|
|
2
4
|
import { size } from './array-utils-size.mjs';
|
|
3
5
|
import { sliceClamped } from './array-utils-slice-clamped.mjs';
|
|
4
6
|
import { isEmpty } from './array-utils-validation.mjs';
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ArrayOfLength,
|
|
3
|
+
type IsFixedLengthList,
|
|
4
|
+
type List,
|
|
5
|
+
type MutableNonEmptyArray,
|
|
6
|
+
type NonEmptyArray,
|
|
7
|
+
type PositiveInt,
|
|
8
|
+
type PositiveUint32,
|
|
9
|
+
type Primitive,
|
|
10
|
+
type SafeUintWithSmallInt,
|
|
11
|
+
type WithSmallInt,
|
|
12
|
+
} from 'ts-type-forge';
|
|
1
13
|
import { IMap } from '../../collections/index.mjs';
|
|
2
14
|
import { expectType } from '../../expect-type.mjs';
|
|
3
15
|
import { asPositiveUint32, asUint32, Uint32 } from '../../number/index.mjs';
|
|
4
16
|
import { castMutable, tp } from '../../others/index.mjs';
|
|
17
|
+
import {
|
|
18
|
+
type ArrayIndex,
|
|
19
|
+
type MapSetKeyType,
|
|
20
|
+
type SizeType,
|
|
21
|
+
} from '../../types.mjs';
|
|
5
22
|
import { newArray, seq } from './array-utils-creation.mjs';
|
|
6
23
|
import { size } from './array-utils-size.mjs';
|
|
7
24
|
import { isNonEmpty } from './array-utils-validation.mjs';
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ArrayAtLeastLen,
|
|
3
|
+
type ArrayOfLength,
|
|
4
|
+
type BoolOr,
|
|
5
|
+
type NonEmptyArray,
|
|
6
|
+
type TypeEq,
|
|
7
|
+
} from 'ts-type-forge';
|
|
1
8
|
import { asUint32, Num } from '../../number/index.mjs';
|
|
9
|
+
import { type ArrayIndex, type SizeType } from '../../types.mjs';
|
|
2
10
|
|
|
3
11
|
/**
|
|
4
12
|
* Type guard that checks if a value is an array.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Optional, pipe } from '../functional/index.mjs';
|
|
2
2
|
import { asUint32 } from '../number/index.mjs';
|
|
3
3
|
import { tp } from '../others/index.mjs';
|
|
4
|
+
import { type MapSetKeyType, type SizeType } from '../types.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Interface for an immutable map with custom key mapping and lookup operations.
|
package/src/collections/imap.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type WidenLiteral } from 'ts-type-forge';
|
|
1
2
|
import { Optional, pipe } from '../functional/index.mjs';
|
|
2
3
|
import { asUint32 } from '../number/index.mjs';
|
|
3
4
|
import { tp, unknownToString } from '../others/index.mjs';
|
|
5
|
+
import { type MapSetKeyType, type SizeType } from '../types.mjs';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Interface for an immutable map with lookup operations and functional
|
package/src/collections/iset.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ReadonlyRecord, type WidenLiteral } from 'ts-type-forge';
|
|
2
2
|
import { asUint32 } from '../number/index.mjs';
|
|
3
3
|
import { unknownToString } from '../others/index.mjs';
|
|
4
|
+
import { type MapSetKeyType, type SizeType } from '../types.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Interface for an immutable set with membership testing and set operation
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { type Primitive } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../expect-type.mjs';
|
|
2
3
|
import { isString } from '../guard/index.mjs';
|
|
4
|
+
import { type MapSetKeyType } from '../types.mjs';
|
|
3
5
|
import { ISet } from './iset.mjs';
|
|
4
6
|
|
|
5
7
|
describe('ISet.create', () => {
|
|
@@ -1000,7 +1002,7 @@ describe('ISet.toArray', () => {
|
|
|
1000
1002
|
expectType<typeof s0.toArray, () => readonly (1 | 2 | 3)[]>('<=');
|
|
1001
1003
|
|
|
1002
1004
|
assert.deepStrictEqual(
|
|
1003
|
-
|
|
1005
|
+
s0.toArray().toSorted((a, b) => a - b),
|
|
1004
1006
|
[1, 2, 3],
|
|
1005
1007
|
);
|
|
1006
1008
|
});
|
|
@@ -1019,7 +1021,7 @@ describe('ISet.toArray', () => {
|
|
|
1019
1021
|
expect(array).toHaveLength(3);
|
|
1020
1022
|
|
|
1021
1023
|
assert.deepStrictEqual(
|
|
1022
|
-
|
|
1024
|
+
array.toSorted((a, b) => a - b),
|
|
1023
1025
|
[1, 2, 3],
|
|
1024
1026
|
);
|
|
1025
1027
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Optional } from '../functional/index.mjs';
|
|
2
2
|
import { range } from '../iterator/index.mjs';
|
|
3
3
|
import { asSafeUint, asUint32 } from '../number/index.mjs';
|
|
4
|
+
import { type SizeType } from '../types.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Interface for a high-performance queue with FIFO (First-In, First-Out)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Optional } from '../functional/index.mjs';
|
|
2
2
|
import { range } from '../iterator/index.mjs';
|
|
3
3
|
import { asUint32, Uint32 } from '../number/index.mjs';
|
|
4
|
+
import { type SizeType } from '../types.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Interface for a high-performance stack with LIFO (Last-In, First-Out)
|
|
@@ -2,6 +2,7 @@ import { expectType } from '../expect-type.mjs';
|
|
|
2
2
|
import { Optional } from '../functional/index.mjs';
|
|
3
3
|
import { range } from '../iterator/index.mjs';
|
|
4
4
|
import { asPositiveSafeInt, asSafeInt } from '../number/index.mjs';
|
|
5
|
+
import { type SizeType } from '../types.mjs';
|
|
5
6
|
import { createStack, type Stack } from './stack.mjs';
|
|
6
7
|
|
|
7
8
|
describe('Stack test', () => {
|
package/src/expect-type.mts
CHANGED
package/src/functional/match.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Optional } from '../optional.mjs';
|
|
1
2
|
import { isSome } from './optional-is-some.mjs';
|
|
2
3
|
import { none } from './optional-none.mjs';
|
|
3
4
|
import { some } from './optional-some.mjs';
|
|
@@ -21,6 +22,7 @@ import { some } from './optional-some.mjs';
|
|
|
21
22
|
*
|
|
22
23
|
* const missing = Optional.zip(
|
|
23
24
|
* Optional.some('value'),
|
|
25
|
+
* // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
24
26
|
* Optional.none as Optional<number>,
|
|
25
27
|
* );
|
|
26
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from './optional.mjs';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type None, type Some } from '../../types.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents an optional value that can either be `Some` (containing a value)
|
|
5
|
+
* or `None` (empty).
|
|
6
|
+
*
|
|
7
|
+
* @template S The type of the value that might be present.
|
|
8
|
+
*/
|
|
9
|
+
export type Optional<S> = None | Some<S>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Base type for any {@link Optional}, used for generic constraints. Represents
|
|
13
|
+
* an {@link Optional} with an unknown value type.
|
|
14
|
+
*/
|
|
15
|
+
export type UnknownOptional = None | Some<unknown>;
|
|
16
|
+
|
|
17
|
+
export type { None, Some } from '../../types.mjs';
|
|
18
|
+
|
|
19
|
+
export * as Optional from './impl/index.mjs';
|
package/src/functional/pipe.mts
CHANGED