ts-data-forge 6.9.2 → 6.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array/impl/array-utils-creation.d.mts +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/index.d.mts +1 -0
- package/dist/index.d.mts.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 +66 -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 +17 -17
- 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/index.mts +1 -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/dist/tsconfig.json +0 -1
- package/src/globals.d.mts +0 -194
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TernaryResult,
|
|
3
|
+
type UnknownTernaryResult,
|
|
4
|
+
} from '../ternary-result.mjs';
|
|
1
5
|
import { err } from './ternary-result-err.mjs';
|
|
2
6
|
import { isErr } from './ternary-result-is-err.mjs';
|
|
3
7
|
import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TernaryResult,
|
|
3
|
+
type UnknownTernaryResult,
|
|
4
|
+
} from '../ternary-result.mjs';
|
|
1
5
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
2
6
|
import { warn } from './ternary-result-warn.mjs';
|
|
3
7
|
import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TernaryErr,
|
|
3
|
+
type TernaryResult,
|
|
4
|
+
type UnknownTernaryResult,
|
|
5
|
+
} from '../ternary-result.mjs';
|
|
1
6
|
import { isOk } from './ternary-result-is-ok.mjs';
|
|
2
7
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
3
8
|
import { ok } from './ternary-result-ok.mjs';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type TernaryResult,
|
|
3
|
+
type UnknownTernaryResult,
|
|
4
|
+
} from '../ternary-result.mjs';
|
|
1
5
|
import { isOk } from './ternary-result-is-ok.mjs';
|
|
2
6
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
3
7
|
import { type NarrowToOk, type NarrowToWarn } from './types.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Optional } from '../../optional/index.mjs';
|
|
2
|
+
import { type UnknownTernaryResult } from '../ternary-result.mjs';
|
|
2
3
|
import { isOk } from './ternary-result-is-ok.mjs';
|
|
3
4
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
4
5
|
import { type UnwrapOk } from './types.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { unknownToString } from '../../../others/index.mjs';
|
|
2
|
+
import { type UnknownTernaryResult } from '../ternary-result.mjs';
|
|
2
3
|
import { isErr } from './ternary-result-is-err.mjs';
|
|
3
4
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
4
5
|
import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { unknownToString } from '../../../others/index.mjs';
|
|
2
|
+
import { type UnknownTernaryResult } from '../ternary-result.mjs';
|
|
2
3
|
import { isErr } from './ternary-result-is-err.mjs';
|
|
3
4
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
4
5
|
import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { unknownToString } from '../../../others/index.mjs';
|
|
2
|
+
import { type UnknownTernaryResult } from '../ternary-result.mjs';
|
|
2
3
|
import { isWarn } from './ternary-result-is-warn.mjs';
|
|
3
4
|
import { type UnwrapErr, type UnwrapOk, type UnwrapWarn } from './types.mjs';
|
|
4
5
|
import { variantName } from './variant-name.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from './ternary-result.mjs';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a `TernaryResult` that is a success, containing a value.
|
|
3
|
+
*/
|
|
4
|
+
export type TernaryOk<S> = Readonly<{
|
|
5
|
+
/** @internal Discriminant property for the 'Ok' type. */
|
|
6
|
+
$$tag: 'ts-data-forge::Result.ok';
|
|
7
|
+
|
|
8
|
+
/** The success value. */
|
|
9
|
+
value: S;
|
|
10
|
+
}>;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Represents a `TernaryResult` that contains a success value and an attached
|
|
14
|
+
* warning.
|
|
15
|
+
*/
|
|
16
|
+
export type TernaryWarn<S, W> = Readonly<{
|
|
17
|
+
/** @internal Discriminant property for the 'Warn' type. */
|
|
18
|
+
$$tag: 'ts-data-forge::Result.warn';
|
|
19
|
+
|
|
20
|
+
/** The success value. */
|
|
21
|
+
value: S;
|
|
22
|
+
|
|
23
|
+
/** The warning value. */
|
|
24
|
+
warning: W;
|
|
25
|
+
}>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Represents a `TernaryResult` that is an error, containing an error value.
|
|
29
|
+
*/
|
|
30
|
+
export type TernaryErr<E> = Readonly<{
|
|
31
|
+
/** @internal Discriminant property for the 'Err' type. */
|
|
32
|
+
$$tag: 'ts-data-forge::Result.err';
|
|
33
|
+
|
|
34
|
+
/** The error value. */
|
|
35
|
+
value: E;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Represents a value that can be `Ok`, `Warn`, or `Err`.
|
|
40
|
+
*/
|
|
41
|
+
export type TernaryResult<S, E, W = E> =
|
|
42
|
+
| TernaryOk<S>
|
|
43
|
+
| TernaryWarn<S, W>
|
|
44
|
+
| TernaryErr<E>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Base type for any `TernaryResult`, used for generic constraints.
|
|
48
|
+
*/
|
|
49
|
+
export type UnknownTernaryResult =
|
|
50
|
+
| TernaryOk<unknown>
|
|
51
|
+
| TernaryWarn<unknown, unknown>
|
|
52
|
+
| TernaryErr<unknown>;
|
|
53
|
+
|
|
54
|
+
export * as TernaryResult from './impl/index.mjs';
|
package/src/guard/has-key.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReadonlyRecord } from 'ts-type-forge';
|
|
1
2
|
import { expectType } from '../expect-type.mjs';
|
|
2
3
|
import { hasKey, type HasKeyReturnType } from './has-key.mjs';
|
|
3
4
|
|
|
@@ -52,6 +53,7 @@ test('hasKey type inferences', () => {
|
|
|
52
53
|
{
|
|
53
54
|
type R = Readonly<{ a: 0 } | { b: 1 }>;
|
|
54
55
|
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
55
57
|
const obj: R = { a: 0 } as R;
|
|
56
58
|
|
|
57
59
|
if (hasKey(obj, 'a')) {
|
|
@@ -68,6 +70,7 @@ test('hasKey type inferences', () => {
|
|
|
68
70
|
{
|
|
69
71
|
type R = Readonly<{ a: 0 } | { a: 1; b: 1 } | { b: 2 } | { c: 3 }>;
|
|
70
72
|
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
71
74
|
const obj: R = { a: 0 } as R;
|
|
72
75
|
|
|
73
76
|
if (hasKey(obj, 'a') && hasKey(obj, 'b')) {
|
|
@@ -84,6 +87,7 @@ test('hasKey type inferences', () => {
|
|
|
84
87
|
| ReadonlyRecord<string, number>
|
|
85
88
|
| Readonly<{ a: 0 } | { a: 1; b: 1 } | { b: 2 }>;
|
|
86
89
|
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
87
91
|
const obj: R = { a: 0 } as R;
|
|
88
92
|
|
|
89
93
|
expectType<
|
package/src/guard/is-record.mts
CHANGED
package/src/guard/is-type.mts
CHANGED
package/src/guard/key-is-in.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReadonlyRecord } from 'ts-type-forge';
|
|
1
2
|
import { keyIsIn } from './key-is-in.mjs';
|
|
2
3
|
|
|
3
4
|
const f = <Key extends string, V, KeySub extends Key>(
|
|
@@ -6,6 +7,7 @@ const f = <Key extends string, V, KeySub extends Key>(
|
|
|
6
7
|
): V | undefined => (keyIsIn(key, obj) ? obj[key] : undefined);
|
|
7
8
|
|
|
8
9
|
describe(keyIsIn, () => {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
9
11
|
f('a' as 'a' | 'b' | 'c', { a: 0, b: 1 });
|
|
10
12
|
|
|
11
13
|
test('', () => {
|
package/src/index.mts
CHANGED
package/src/iterator/range.mts
CHANGED
package/src/json/json.mts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Int,
|
|
3
|
+
type NonNegativeFiniteNumber,
|
|
4
|
+
type FiniteNumber as TtfImported_FiniteNumber,
|
|
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 FiniteNumber = TtfImported_FiniteNumber;
|
|
10
|
+
|
|
4
11
|
type ElementType = FiniteNumber;
|
|
5
12
|
|
|
6
13
|
const typeNameInMessage = 'a finite number';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Int as TtfImported_Int } 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 Int = TtfImported_Int;
|
|
6
|
+
|
|
4
7
|
type ElementType = Int;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'an integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Int16 as TtfImported_Int16 } 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 Int16 = TtfImported_Int16;
|
|
6
|
+
|
|
4
7
|
type ElementType = Int16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'an integer in [-2^15, 2^15)';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type Int32 as TtfImported_Int32 } 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 Int32 = TtfImported_Int32;
|
|
6
|
+
|
|
4
7
|
type ElementType = Int32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'an integer in [-2^31, 2^31)';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type NonNegativeFiniteNumber as TtfImported_NonNegativeFiniteNumber,
|
|
3
|
+
type Uint,
|
|
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 NonNegativeFiniteNumber = TtfImported_NonNegativeFiniteNumber;
|
|
9
|
+
|
|
4
10
|
type ElementType = NonNegativeFiniteNumber;
|
|
5
11
|
|
|
6
12
|
const typeNameInMessage = 'a non-negative finite number';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonNegativeInt16 as TtfImported_NonNegativeInt16 } 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 NonNegativeInt16 = TtfImported_NonNegativeInt16;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonNegativeInt16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative integer in [0, 2^15)';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonNegativeInt32 as TtfImported_NonNegativeInt32 } 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 NonNegativeInt32 = TtfImported_NonNegativeInt32;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonNegativeInt32;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-negative integer in [0, 2^31)';
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Int,
|
|
3
|
+
type NonZeroInt,
|
|
4
|
+
type PositiveFiniteNumber,
|
|
5
|
+
type NonZeroFiniteNumber as TtfImported_NonZeroFiniteNumber,
|
|
6
|
+
} from 'ts-type-forge';
|
|
1
7
|
import { expectType } from '../../expect-type.mjs';
|
|
2
8
|
import { TsDataForgeInternals } from '../refined-number-utils.mjs';
|
|
3
9
|
|
|
10
|
+
export type NonZeroFiniteNumber = TtfImported_NonZeroFiniteNumber;
|
|
11
|
+
|
|
4
12
|
type ElementType = NonZeroFiniteNumber;
|
|
5
13
|
|
|
6
14
|
const typeNameInMessage = 'a non-zero finite number';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonZeroInt as TtfImported_NonZeroInt } 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 NonZeroInt = TtfImported_NonZeroInt;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonZeroInt;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-zero integer';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type NonZeroInt16 as TtfImported_NonZeroInt16 } 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 NonZeroInt16 = TtfImported_NonZeroInt16;
|
|
6
|
+
|
|
4
7
|
type ElementType = NonZeroInt16;
|
|
5
8
|
|
|
6
9
|
const typeNameInMessage = 'a non-zero integer in [-2^15, 2^15)';
|
|
@@ -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)';
|