@vinicunca/perkakas 1.0.2 → 1.0.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/dist/add-prop.spec-d.cjs +1 -0
- package/dist/add-prop.spec-d.d.cts +2 -0
- package/dist/add-prop.spec-d.d.ts +2 -0
- package/dist/add-prop.spec-d.js +1 -0
- package/dist/chunk-2ADWP73S.js +1 -0
- package/dist/chunk-2VLHCBHJ.js +1 -0
- package/dist/chunk-HU67VIVI.js +1 -0
- package/dist/chunk-J5PNUDDU.js +1 -0
- package/dist/chunk-MZWACWOX.js +1 -0
- package/dist/chunk-QHGCU3LJ.js +1 -0
- package/dist/chunk-T7S2RC5M.cjs +1 -0
- package/dist/chunk-TRIZIXDA.cjs +1 -0
- package/dist/chunk-ULMOKABQ.cjs +1 -0
- package/dist/chunk-UVAWCZB6.js +1 -0
- package/dist/chunk-VAUOPMAN.cjs +1 -0
- package/dist/chunk-XSYAC5NV.cjs +1 -0
- package/dist/chunk-ZJGZ2TEC.cjs +1 -0
- package/dist/chunk.spec-d.cjs +1 -0
- package/dist/chunk.spec-d.d.cts +2 -0
- package/dist/chunk.spec-d.d.ts +2 -0
- package/dist/chunk.spec-d.js +1 -0
- package/dist/conditional.spec-d.cjs +1 -0
- package/dist/conditional.spec-d.d.cts +2 -0
- package/dist/conditional.spec-d.d.ts +2 -0
- package/dist/conditional.spec-d.js +1 -0
- package/dist/constant.spec-d.cjs +1 -0
- package/dist/constant.spec-d.d.cts +2 -0
- package/dist/constant.spec-d.d.ts +2 -0
- package/dist/constant.spec-d.js +1 -0
- package/dist/{curry-order-rules-BOMf1JS7.d.cts → curry-order-rules-DETxSzle.d.cts} +1 -1
- package/dist/{curry-order-rules-BOMf1JS7.d.ts → curry-order-rules-DETxSzle.d.ts} +1 -1
- package/dist/debounce.spec-d.cjs +1 -0
- package/dist/debounce.spec-d.d.cts +2 -0
- package/dist/debounce.spec-d.d.ts +2 -0
- package/dist/debounce.spec-d.js +1 -0
- package/dist/do-nothing.spec-d.cjs +1 -0
- package/dist/do-nothing.spec-d.d.cts +2 -0
- package/dist/do-nothing.spec-d.d.ts +2 -0
- package/dist/do-nothing.spec-d.js +1 -0
- package/dist/drop-first-by.d.cts +1 -1
- package/dist/drop-first-by.d.ts +1 -1
- package/dist/entries.spec-d.cjs +1 -0
- package/dist/entries.spec-d.d.cts +2 -0
- package/dist/entries.spec-d.d.ts +2 -0
- package/dist/entries.spec-d.js +1 -0
- package/dist/evolve.spec-d.cjs +1 -0
- package/dist/evolve.spec-d.d.cts +2 -0
- package/dist/evolve.spec-d.d.ts +2 -0
- package/dist/evolve.spec-d.js +1 -0
- package/dist/filter.spec-d.cjs +1 -0
- package/dist/filter.spec-d.d.cts +2 -0
- package/dist/filter.spec-d.d.ts +2 -0
- package/dist/filter.spec-d.js +1 -0
- package/dist/find.spec-d.cjs +1 -0
- package/dist/find.spec-d.d.cts +2 -0
- package/dist/find.spec-d.d.ts +2 -0
- package/dist/find.spec-d.js +1 -0
- package/dist/first-by.cjs +1 -1
- package/dist/first-by.d.cts +1 -1
- package/dist/first-by.d.ts +1 -1
- package/dist/first-by.js +1 -1
- package/dist/first-by.spec-d.cjs +1 -0
- package/dist/first-by.spec-d.d.cts +2 -0
- package/dist/first-by.spec-d.d.ts +2 -0
- package/dist/first-by.spec-d.js +1 -0
- package/dist/first.spec-d.cjs +1 -0
- package/dist/first.spec-d.d.cts +2 -0
- package/dist/first.spec-d.d.ts +2 -0
- package/dist/first.spec-d.js +1 -0
- package/dist/flat.spec-d.cjs +1 -0
- package/dist/flat.spec-d.d.cts +2 -0
- package/dist/flat.spec-d.d.ts +2 -0
- package/dist/flat.spec-d.js +1 -0
- package/dist/for-each-obj.spec-d.cjs +1 -0
- package/dist/for-each-obj.spec-d.d.cts +2 -0
- package/dist/for-each-obj.spec-d.d.ts +2 -0
- package/dist/for-each-obj.spec-d.js +1 -0
- package/dist/for-each.spec-d.cjs +1 -0
- package/dist/for-each.spec-d.d.cts +2 -0
- package/dist/for-each.spec-d.d.ts +2 -0
- package/dist/for-each.spec-d.js +1 -0
- package/dist/from-entries.spec-d.cjs +1 -0
- package/dist/from-entries.spec-d.d.cts +2 -0
- package/dist/from-entries.spec-d.d.ts +2 -0
- package/dist/from-entries.spec-d.js +1 -0
- package/dist/from-keys.spec-d.cjs +1 -0
- package/dist/from-keys.spec-d.d.cts +2 -0
- package/dist/from-keys.spec-d.d.ts +2 -0
- package/dist/from-keys.spec-d.js +1 -0
- package/dist/group-by.spec-d.cjs +1 -0
- package/dist/group-by.spec-d.d.cts +2 -0
- package/dist/group-by.spec-d.d.ts +2 -0
- package/dist/group-by.spec-d.js +1 -0
- package/dist/has-at-least.spec-d.cjs +1 -0
- package/dist/has-at-least.spec-d.d.cts +2 -0
- package/dist/has-at-least.spec-d.d.ts +2 -0
- package/dist/has-at-least.spec-d.js +1 -0
- package/dist/has-sub-object.spec-d.cjs +1 -0
- package/dist/has-sub-object.spec-d.d.cts +2 -0
- package/dist/has-sub-object.spec-d.d.ts +2 -0
- package/dist/has-sub-object.spec-d.js +1 -0
- package/dist/identity.spec-d.cjs +1 -0
- package/dist/identity.spec-d.d.cts +2 -0
- package/dist/identity.spec-d.d.ts +2 -0
- package/dist/identity.spec-d.js +1 -0
- package/dist/index-by.spec-d.cjs +1 -0
- package/dist/index-by.spec-d.d.cts +2 -0
- package/dist/index-by.spec-d.d.ts +2 -0
- package/dist/index-by.spec-d.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/intersection.spec-d.cjs +1 -0
- package/dist/intersection.spec-d.d.cts +2 -0
- package/dist/intersection.spec-d.d.ts +2 -0
- package/dist/intersection.spec-d.js +1 -0
- package/dist/invert.spec-d.cjs +1 -0
- package/dist/invert.spec-d.d.cts +2 -0
- package/dist/invert.spec-d.d.ts +2 -0
- package/dist/invert.spec-d.js +1 -0
- package/dist/is-array.spec-d.cjs +1 -0
- package/dist/is-array.spec-d.d.cts +2 -0
- package/dist/is-array.spec-d.d.ts +2 -0
- package/dist/is-array.spec-d.js +1 -0
- package/dist/is-big-int.spec-d.cjs +1 -0
- package/dist/is-big-int.spec-d.d.cts +2 -0
- package/dist/is-big-int.spec-d.d.ts +2 -0
- package/dist/is-big-int.spec-d.js +1 -0
- package/dist/is-boolean.spec-d.cjs +1 -0
- package/dist/is-boolean.spec-d.d.cts +2 -0
- package/dist/is-boolean.spec-d.d.ts +2 -0
- package/dist/is-boolean.spec-d.js +1 -0
- package/dist/is-date.spec-d.cjs +1 -0
- package/dist/is-date.spec-d.d.cts +2 -0
- package/dist/is-date.spec-d.d.ts +2 -0
- package/dist/is-date.spec-d.js +1 -0
- package/dist/is-deep-equal.d.cts +26 -10
- package/dist/is-deep-equal.d.ts +26 -10
- package/dist/is-deep-equal.spec-d.cjs +1 -0
- package/dist/is-deep-equal.spec-d.d.cts +2 -0
- package/dist/is-deep-equal.spec-d.d.ts +2 -0
- package/dist/is-deep-equal.spec-d.js +1 -0
- package/dist/is-defined.spec-d.cjs +1 -0
- package/dist/is-defined.spec-d.d.cts +2 -0
- package/dist/is-defined.spec-d.d.ts +2 -0
- package/dist/is-defined.spec-d.js +1 -0
- package/dist/is-empty.cjs +1 -1
- package/dist/is-empty.js +1 -1
- package/dist/is-empty.spec-d.cjs +1 -0
- package/dist/is-empty.spec-d.d.cts +2 -0
- package/dist/is-empty.spec-d.d.ts +2 -0
- package/dist/is-empty.spec-d.js +1 -0
- package/dist/is-error.spec-d.cjs +1 -0
- package/dist/is-error.spec-d.d.cts +2 -0
- package/dist/is-error.spec-d.d.ts +2 -0
- package/dist/is-error.spec-d.js +1 -0
- package/dist/is-function.spec-d.cjs +1 -0
- package/dist/is-function.spec-d.d.cts +2 -0
- package/dist/is-function.spec-d.d.ts +2 -0
- package/dist/is-function.spec-d.js +1 -0
- package/dist/is-included-in.spec-d.cjs +1 -0
- package/dist/is-included-in.spec-d.d.cts +2 -0
- package/dist/is-included-in.spec-d.d.ts +2 -0
- package/dist/is-included-in.spec-d.js +1 -0
- package/dist/is-non-null.spec-d.cjs +1 -0
- package/dist/is-non-null.spec-d.d.cts +2 -0
- package/dist/is-non-null.spec-d.d.ts +2 -0
- package/dist/is-non-null.spec-d.js +1 -0
- package/dist/is-non-nullish.spec-d.cjs +1 -0
- package/dist/is-non-nullish.spec-d.d.cts +2 -0
- package/dist/is-non-nullish.spec-d.d.ts +2 -0
- package/dist/is-non-nullish.spec-d.js +1 -0
- package/dist/is-not.spec-d.cjs +1 -0
- package/dist/is-not.spec-d.d.cts +2 -0
- package/dist/is-not.spec-d.d.ts +2 -0
- package/dist/is-not.spec-d.js +1 -0
- package/dist/is-nullish.spec-d.cjs +1 -0
- package/dist/is-nullish.spec-d.d.cts +2 -0
- package/dist/is-nullish.spec-d.d.ts +2 -0
- package/dist/is-nullish.spec-d.js +1 -0
- package/dist/is-number.spec-d.cjs +1 -0
- package/dist/is-number.spec-d.d.cts +2 -0
- package/dist/is-number.spec-d.d.ts +2 -0
- package/dist/is-number.spec-d.js +1 -0
- package/dist/is-object-type.spec-d.cjs +1 -0
- package/dist/is-object-type.spec-d.d.cts +2 -0
- package/dist/is-object-type.spec-d.d.ts +2 -0
- package/dist/is-object-type.spec-d.js +1 -0
- package/dist/is-plain-object.spec-d.cjs +1 -0
- package/dist/is-plain-object.spec-d.d.cts +2 -0
- package/dist/is-plain-object.spec-d.d.ts +2 -0
- package/dist/is-plain-object.spec-d.js +1 -0
- package/dist/is-promise.spec-d.cjs +1 -0
- package/dist/is-promise.spec-d.d.cts +2 -0
- package/dist/is-promise.spec-d.d.ts +2 -0
- package/dist/is-promise.spec-d.js +1 -0
- package/dist/is-shallow-equal.cjs +1 -0
- package/dist/is-shallow-equal.d.cts +69 -0
- package/dist/is-shallow-equal.d.ts +69 -0
- package/dist/is-shallow-equal.js +1 -0
- package/dist/is-shallow-equal.spec-d.cjs +1 -0
- package/dist/is-shallow-equal.spec-d.d.cts +2 -0
- package/dist/is-shallow-equal.spec-d.d.ts +2 -0
- package/dist/is-shallow-equal.spec-d.js +1 -0
- package/dist/is-strict-equal.cjs +1 -0
- package/dist/is-strict-equal.d.cts +65 -0
- package/dist/is-strict-equal.d.ts +65 -0
- package/dist/is-strict-equal.js +1 -0
- package/dist/is-strict-equal.spec-d.cjs +1 -0
- package/dist/is-strict-equal.spec-d.d.cts +2 -0
- package/dist/is-strict-equal.spec-d.d.ts +2 -0
- package/dist/is-strict-equal.spec-d.js +1 -0
- package/dist/is-string.spec-d.cjs +1 -0
- package/dist/is-string.spec-d.d.cts +2 -0
- package/dist/is-string.spec-d.d.ts +2 -0
- package/dist/is-string.spec-d.js +1 -0
- package/dist/is-symbol.spec-d.cjs +1 -0
- package/dist/is-symbol.spec-d.d.cts +2 -0
- package/dist/is-symbol.spec-d.d.ts +2 -0
- package/dist/is-symbol.spec-d.js +1 -0
- package/dist/is-truthy.spec-d.cjs +1 -0
- package/dist/is-truthy.spec-d.d.cts +2 -0
- package/dist/is-truthy.spec-d.d.ts +2 -0
- package/dist/is-truthy.spec-d.js +1 -0
- package/dist/join.spec-d.cjs +1 -0
- package/dist/join.spec-d.d.cts +2 -0
- package/dist/join.spec-d.d.ts +2 -0
- package/dist/join.spec-d.js +1 -0
- package/dist/keys.spec-d.cjs +1 -0
- package/dist/keys.spec-d.d.cts +2 -0
- package/dist/keys.spec-d.d.ts +2 -0
- package/dist/keys.spec-d.js +1 -0
- package/dist/last.spec-d.cjs +1 -0
- package/dist/last.spec-d.d.cts +2 -0
- package/dist/last.spec-d.d.ts +2 -0
- package/dist/last.spec-d.js +1 -0
- package/dist/map-keys.spec-d.cjs +1 -0
- package/dist/map-keys.spec-d.d.cts +2 -0
- package/dist/map-keys.spec-d.d.ts +2 -0
- package/dist/map-keys.spec-d.js +1 -0
- package/dist/map-values.spec-d.cjs +1 -0
- package/dist/map-values.spec-d.d.cts +2 -0
- package/dist/map-values.spec-d.d.ts +2 -0
- package/dist/map-values.spec-d.js +1 -0
- package/dist/map-with-feedback.spec-d.cjs +1 -0
- package/dist/map-with-feedback.spec-d.d.cts +2 -0
- package/dist/map-with-feedback.spec-d.d.ts +2 -0
- package/dist/map-with-feedback.spec-d.js +1 -0
- package/dist/map.spec-d.cjs +1 -0
- package/dist/map.spec-d.d.cts +2 -0
- package/dist/map.spec-d.d.ts +2 -0
- package/dist/map.spec-d.js +1 -0
- package/dist/merge-deep.spec-d.cjs +1 -0
- package/dist/merge-deep.spec-d.d.cts +2 -0
- package/dist/merge-deep.spec-d.d.ts +2 -0
- package/dist/merge-deep.spec-d.js +1 -0
- package/dist/merge.spec-d.cjs +1 -0
- package/dist/merge.spec-d.d.cts +2 -0
- package/dist/merge.spec-d.d.ts +2 -0
- package/dist/merge.spec-d.js +1 -0
- package/dist/nth-by.d.cts +1 -1
- package/dist/nth-by.d.ts +1 -1
- package/dist/nth-by.spec-d.cjs +1 -0
- package/dist/nth-by.spec-d.d.cts +2 -0
- package/dist/nth-by.spec-d.d.ts +2 -0
- package/dist/nth-by.spec-d.js +1 -0
- package/dist/omit-by.spec-d.cjs +1 -0
- package/dist/omit-by.spec-d.d.cts +2 -0
- package/dist/omit-by.spec-d.d.ts +2 -0
- package/dist/omit-by.spec-d.js +1 -0
- package/dist/omit.spec-d.cjs +1 -0
- package/dist/omit.spec-d.d.cts +2 -0
- package/dist/omit.spec-d.d.ts +2 -0
- package/dist/omit.spec-d.js +1 -0
- package/dist/only.spec-d.cjs +1 -0
- package/dist/only.spec-d.d.cts +2 -0
- package/dist/only.spec-d.d.ts +2 -0
- package/dist/only.spec-d.js +1 -0
- package/dist/partition.spec-d.cjs +1 -0
- package/dist/partition.spec-d.d.cts +2 -0
- package/dist/partition.spec-d.d.ts +2 -0
- package/dist/partition.spec-d.js +1 -0
- package/dist/pick-by.spec-d.cjs +1 -0
- package/dist/pick-by.spec-d.d.cts +2 -0
- package/dist/pick-by.spec-d.d.ts +2 -0
- package/dist/pick-by.spec-d.js +1 -0
- package/dist/pick.spec-d.cjs +1 -0
- package/dist/pick.spec-d.d.cts +2 -0
- package/dist/pick.spec-d.d.ts +2 -0
- package/dist/pick.spec-d.js +1 -0
- package/dist/product.spec-d.cjs +1 -0
- package/dist/product.spec-d.d.cts +2 -0
- package/dist/product.spec-d.d.ts +2 -0
- package/dist/product.spec-d.js +1 -0
- package/dist/prop.spec-d.cjs +1 -0
- package/dist/prop.spec-d.d.cts +2 -0
- package/dist/prop.spec-d.d.ts +2 -0
- package/dist/prop.spec-d.js +1 -0
- package/dist/pull-object.spec-d.cjs +1 -0
- package/dist/pull-object.spec-d.d.cts +2 -0
- package/dist/pull-object.spec-d.d.ts +2 -0
- package/dist/pull-object.spec-d.js +1 -0
- package/dist/rank-by.d.cts +1 -1
- package/dist/rank-by.d.ts +1 -1
- package/dist/reverse.spec-d.cjs +1 -0
- package/dist/reverse.spec-d.d.cts +2 -0
- package/dist/reverse.spec-d.d.ts +2 -0
- package/dist/reverse.spec-d.js +1 -0
- package/dist/sample.spec-d.cjs +1 -0
- package/dist/sample.spec-d.d.cts +2 -0
- package/dist/sample.spec-d.d.ts +2 -0
- package/dist/sample.spec-d.js +1 -0
- package/dist/set-path.cjs +1 -1
- package/dist/set-path.d.cts +4 -4
- package/dist/set-path.d.ts +4 -4
- package/dist/set-path.js +1 -1
- package/dist/set-path.spec-d.cjs +1 -0
- package/dist/set-path.spec-d.d.cts +2 -0
- package/dist/set-path.spec-d.d.ts +2 -0
- package/dist/set-path.spec-d.js +1 -0
- package/dist/set.spec-d.cjs +1 -0
- package/dist/set.spec-d.d.cts +2 -0
- package/dist/set.spec-d.d.ts +2 -0
- package/dist/set.spec-d.js +1 -0
- package/dist/sort-by.d.cts +1 -1
- package/dist/sort-by.d.ts +1 -1
- package/dist/sort-by.spec-d.cjs +1 -0
- package/dist/sort-by.spec-d.d.cts +2 -0
- package/dist/sort-by.spec-d.d.ts +2 -0
- package/dist/sort-by.spec-d.js +1 -0
- package/dist/sort.spec-d.cjs +1 -0
- package/dist/sort.spec-d.d.cts +2 -0
- package/dist/sort.spec-d.d.ts +2 -0
- package/dist/sort.spec-d.js +1 -0
- package/dist/splice.spec-d.cjs +1 -0
- package/dist/splice.spec-d.d.cts +2 -0
- package/dist/splice.spec-d.d.ts +2 -0
- package/dist/splice.spec-d.js +1 -0
- package/dist/split.spec-d.cjs +1 -0
- package/dist/split.spec-d.d.cts +2 -0
- package/dist/split.spec-d.d.ts +2 -0
- package/dist/split.spec-d.js +1 -0
- package/dist/string-to-path.spec-d.cjs +1 -0
- package/dist/string-to-path.spec-d.d.cts +2 -0
- package/dist/string-to-path.spec-d.d.ts +2 -0
- package/dist/string-to-path.spec-d.js +1 -0
- package/dist/sum.spec-d.cjs +1 -0
- package/dist/sum.spec-d.d.cts +2 -0
- package/dist/sum.spec-d.d.ts +2 -0
- package/dist/sum.spec-d.js +1 -0
- package/dist/swap-props.spec-d.cjs +1 -0
- package/dist/swap-props.spec-d.d.cts +2 -0
- package/dist/swap-props.spec-d.d.ts +2 -0
- package/dist/swap-props.spec-d.js +1 -0
- package/dist/take-first-by.d.cts +1 -1
- package/dist/take-first-by.d.ts +1 -1
- package/dist/tap.spec-d.cjs +1 -0
- package/dist/tap.spec-d.d.cts +2 -0
- package/dist/tap.spec-d.d.ts +2 -0
- package/dist/tap.spec-d.js +1 -0
- package/dist/times.cjs +1 -1
- package/dist/times.d.cts +21 -5
- package/dist/times.d.ts +21 -5
- package/dist/times.js +1 -1
- package/dist/times.spec-d.cjs +1 -0
- package/dist/times.spec-d.d.cts +2 -0
- package/dist/times.spec-d.d.ts +2 -0
- package/dist/times.spec-d.js +1 -0
- package/dist/values.spec-d.cjs +1 -0
- package/dist/values.spec-d.d.cts +2 -0
- package/dist/values.spec-d.d.ts +2 -0
- package/dist/values.spec-d.js +1 -0
- package/dist/zip-with.spec-d.cjs +1 -0
- package/dist/zip-with.spec-d.d.cts +2 -0
- package/dist/zip-with.spec-d.d.ts +2 -0
- package/dist/zip-with.spec-d.js +1 -0
- package/dist/zip.spec-d.cjs +1 -0
- package/dist/zip.spec-d.d.cts +2 -0
- package/dist/zip.spec-d.d.ts +2 -0
- package/dist/zip.spec-d.js +1 -0
- package/package.json +15 -14
- package/dist/chunk-4XRKXTOK.js +0 -1
- package/dist/chunk-CXRG2GSY.js +0 -1
- package/dist/chunk-EDKMZBZ3.cjs +0 -1
- package/dist/chunk-NNU5DU4F.cjs +0 -1
- package/dist/chunk-NQR6HZYF.js +0 -1
- package/dist/chunk-UH3TDC4T.cjs +0 -1
- package/dist/chunk-ZW3IUWYO.js +0 -1
- /package/dist/{chunk-XJRGE7WL.cjs → chunk-DHNCWVVT.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-C4EDF27A.js";import{a as r}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("arrays",()=>{test("empty tuple",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("empty readonly tuple",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("readonly array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()}),test("tuple",()=>{let e=t(["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple",()=>{let e=t(["a",1,!0]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest tail",()=>{let e=t(["a"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest tail",()=>{let e=t(["a"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest head",()=>{let e=t(["b"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest head",()=>{let e=t(["b"]);expectTypeOf(e).toEqualTypeOf()}),test("tuple with rest middle",()=>{let e=t(["a","c"]);expectTypeOf(e).toEqualTypeOf()}),test("readonly tuple with rest middle",()=>{let e=t(["a","c"]);expectTypeOf(e).toEqualTypeOf()})});describe("object types",()=>{test("empty record (string)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("empty record (number)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("empty record (const)",()=>{let e=t({});expectTypeOf(e).toEqualTypeOf()}),test("unions of records",()=>{let e={},a=t(e);expectTypeOf(a).toEqualTypeOf();let s=r(e,t());expectTypeOf(s).toEqualTypeOf()}),test("simple (required) object",()=>{let e=t({a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("simple partial object",()=>{let e=t({a:"a",b:1,c:!0});expectTypeOf(e).toEqualTypeOf()}),test("object with index signature",()=>{let e=t({hello:"world",a:"goodbye"});expectTypeOf(e).toEqualTypeOf()}),test("Record with literal union",()=>{let e=t({a:1,b:2});expectTypeOf(e).toEqualTypeOf()}),test("Record with template string literal",()=>{let e=t({param_123:"hello",param_456:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with just symbol keys",()=>{let e=t({[Symbol("a")]:1,[Symbol("b")]:"world"});expectTypeOf(e).toEqualTypeOf()}),test("object with number keys",()=>{let e=t({123:"HELLO"});expectTypeOf(e).toEqualTypeOf()}),test("object with combined symbols and keys",()=>{let e=t({a:1,[Symbol("b")]:"world",123:!0});expectTypeOf(e).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkCQQLWV2Acjs = require('./chunk-CQQLWV2A.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("works with empty arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});it("works with regular arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [1,2,3]);expectTypeOf(e).toEqualTypeOf()});test("works with non-empty arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("should infer type in pipes",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, "this is a text",r=>[...r],_chunkCQQLWV2Acjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});test("can infer last type from const arrays",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [3,"a",!1]);expectTypeOf(e).toEqualTypeOf()});test("a bit more complex example",()=>{let e=_chunkCQQLWV2Acjs.a.call(void 0, [["a",1],!0,{foo:"bar"}]);expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-IYUNRFZS.js";import{a as s}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("works with empty arrays",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()});it("works with regular arrays",()=>{let e=t([1,2,3]);expectTypeOf(e).toEqualTypeOf()});test("works with non-empty arrays",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("should infer type in pipes",()=>{let e=s("this is a text",r=>[...r],t());expectTypeOf(e).toEqualTypeOf()});test("can infer last type from const arrays",()=>{let e=t([3,"a",!1]);expectTypeOf(e).toEqualTypeOf()});test("a bit more complex example",()=>{let e=t([["a",1],!0,{foo:"bar"}]);expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkXXU2FTTAcjs = require('./chunk-XXU2FTTA.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("simple string records",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(e).toEqualTypeOf()});test("simple number records",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, 123));expectTypeOf(e).toEqualTypeOf()});test("mapping to a string literal",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, "cat"));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the mapper",()=>{_chunkXXU2FTTAcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hellO",c:!0},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),3))});test("symbols can be used as the return value",()=>{let e=Symbol("mySymbol"),o=_chunkXXU2FTTAcjs.a.call(void 0, {a:1},_chunkWLNQOMKLcjs.a.call(void 0, e));expectTypeOf(o).toEqualTypeOf()});test("number keys are converted to strings",()=>{_chunkXXU2FTTAcjs.a.call(void 0, {123:"abc",456:"def"},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),e))});test("numbers returned from the mapper are used as-is",()=>{let e=_chunkXXU2FTTAcjs.a.call(void 0, {a:"b"},_chunkWLNQOMKLcjs.a.call(void 0, 123));expectTypeOf(e).toEqualTypeOf()});test("union of records",()=>{let e={},o=_chunkXXU2FTTAcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(o).toEqualTypeOf();let a=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkXXU2FTTAcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, "hello")));expectTypeOf(a).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-5NG5PDAH.js";import{a as s}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("simple string records",()=>{let e=t({},r("hello"));expectTypeOf(e).toEqualTypeOf()});test("simple number records",()=>{let e=t({},r(123));expectTypeOf(e).toEqualTypeOf()});test("mapping to a string literal",()=>{let e=t({},r("cat"));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the mapper",()=>{t({[Symbol("mySymbol")]:1,b:"hellO",c:!0},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),3))});test("symbols can be used as the return value",()=>{let e=Symbol("mySymbol"),o=t({a:1},r(e));expectTypeOf(o).toEqualTypeOf()});test("number keys are converted to strings",()=>{t({123:"abc",456:"def"},(e,o)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(o).toEqualTypeOf(),e))});test("numbers returned from the mapper are used as-is",()=>{let e=t({a:"b"},r(123));expectTypeOf(e).toEqualTypeOf()});test("union of records",()=>{let e={},o=t(e,r("hello"));expectTypeOf(o).toEqualTypeOf();let a=s(e,t(r("hello")));expectTypeOf(a).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkGNEUT34Mcjs = require('./chunk-GNEUT34M.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("interface",()=>{test("should set the type of the key to be the union of the keys of the object",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>expectTypeOf(e).toEqualTypeOf())}),test("should exclude symbols from keys",()=>{let t=Symbol("mySymbol");_chunkGNEUT34Mcjs.a.call(void 0, {},(e,n)=>expectTypeOf(n).toEqualTypeOf())})});describe("mapped type",()=>{test("should work with string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("indexed signature",()=>{test("should work with string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("branded types",()=>{test("should infer types correctly in the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {U1:1,U2:2},(e,n)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf()})})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=_chunkGNEUT34Mcjs.a.call(void 0, {[t]:1,a:"hello"},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()});test("symbols are ignored by the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {[Symbol("a")]:"hello",b:1,c:!0},(t,e)=>{expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()})});test("objects with just symbol keys are still well defined",()=>{let t=_chunkGNEUT34Mcjs.a.call(void 0, {[Symbol("a")]:1},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()});test("number keys are converted to string in the mapper",()=>{_chunkGNEUT34Mcjs.a.call(void 0, {123:456},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),"world"))});test("maintains partiality",()=>{let t=_chunkGNEUT34Mcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()});test("unions of records",()=>{let t={},e=_chunkGNEUT34Mcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, "hello"));expectTypeOf(e).toEqualTypeOf();let n=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkGNEUT34Mcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, "hello")));expectTypeOf(n).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-ZA4IP5S7.js";import{a as r}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as s}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("interface",()=>{test("should set the type of the key to be the union of the keys of the object",()=>{o({},(t,e)=>expectTypeOf(e).toEqualTypeOf())}),test("should exclude symbols from keys",()=>{let t=Symbol("mySymbol");o({},(e,n)=>expectTypeOf(n).toEqualTypeOf())})});describe("mapped type",()=>{test("should work with string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("indexed signature",()=>{test("should work with string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with number keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should work with template literal string keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})}),test("should not work with symbol keys",()=>{o({},(t,e)=>{expectTypeOf(e).toEqualTypeOf()})})});describe("branded types",()=>{test("should infer types correctly in the mapper",()=>{o({U1:1,U2:2},(e,n)=>{expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf()})})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=o({[t]:1,a:"hello"},s(!0));expectTypeOf(e).toEqualTypeOf()});test("symbols are ignored by the mapper",()=>{o({[Symbol("a")]:"hello",b:1,c:!0},(t,e)=>{expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf()})});test("objects with just symbol keys are still well defined",()=>{let t=o({[Symbol("a")]:1},s(!0));expectTypeOf(t).toEqualTypeOf()});test("number keys are converted to string in the mapper",()=>{o({123:456},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),"world"))});test("maintains partiality",()=>{let t=o({},s(!0));expectTypeOf(t).toEqualTypeOf()});test("unions of records",()=>{let t={},e=o(t,s("hello"));expectTypeOf(e).toEqualTypeOf();let n=r(t,o(s("hello")));expectTypeOf(n).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkA6WT2DZUcjs = require('./chunk-A6WT2DZU.cjs');require('./chunk-NLX7PGPI.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');it("should return a mutable tuple type whose length matches input container's length, consisting of the type of the initial value",()=>{let e=_chunkA6WT2DZUcjs.a.call(void 0, [1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=_chunkA6WT2DZUcjs.a.call(void 0, ["1","2","3","4","5"],(t,n)=>t+Number.parseInt(n,10),100);expectTypeOf(e).toEqualTypeOf()});it("should correctly infer type with a non-literal array type",()=>{let e=_chunkA6WT2DZUcjs.a.call(void 0, [1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3,4,5],_chunkA6WT2DZUcjs.a.call(void 0, (t,n)=>t+n,100));expectTypeOf(e).toEqualTypeOf()});it("the items array passed to the callback should be an array type containing the union type of all of the members in the original array",()=>{_chunkA6WT2DZUcjs.a.call(void 0, [1,2,3,4,5],(e,t,n,i)=>(expectTypeOf(i).toEqualTypeOf(),e+t),100)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-LSXNPOLD.js";import"./chunk-C6L5NLLB.js";import{a}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";it("should return a mutable tuple type whose length matches input container's length, consisting of the type of the initial value",()=>{let e=r([1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=r(["1","2","3","4","5"],(t,n)=>t+Number.parseInt(n,10),100);expectTypeOf(e).toEqualTypeOf()});it("should correctly infer type with a non-literal array type",()=>{let e=r([1,2,3,4,5],(t,n)=>t+n,100);expectTypeOf(e).toEqualTypeOf()});it("should return a tuple consisting of the initial value type even if the initial iterable contains a different type",()=>{let e=a([1,2,3,4,5],r((t,n)=>t+n,100));expectTypeOf(e).toEqualTypeOf()});it("the items array passed to the callback should be an array type containing the union type of all of the members in the original array",()=>{r([1,2,3,4,5],(e,t,n,i)=>(expectTypeOf(i).toEqualTypeOf(),e+t),100)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkWW7P3TAUcjs = require('./chunk-WW7P3TAU.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');var _chunkSRZSHSZDcjs = require('./chunk-SRZSHSZD.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("readonly number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("readonly number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("named number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("mixed type tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,"2",!0],_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("readonly mixed type tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,"2",!0],_chunkWLNQOMKLcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (tail) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (tail) readonly number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (head) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});it("nonempty readonly (head) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],_chunkSRZSHSZDcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf()});describe("Indexed",()=>{it("number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("readonly number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("readonly number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("named number 3-tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("mixed type tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,"2",!0],(u,n)=>n);expectTypeOf(e).toEqualTypeOf()}),it("readonly mixed type tuple",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,"2",!0],(u,n)=>n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (tail) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (tail) readonly number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (head) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty readonly (head) number array",()=>{let e=_chunkWW7P3TAUcjs.a.call(void 0, [1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-QRDGUNHT.js";import{a as m}from"./chunk-T5XG33UI.js";import{a as t}from"./chunk-SVOK32ZP.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("readonly number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("number 3-tuple",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("readonly number 3-tuple",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("named number 3-tuple",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("mixed type tuple",()=>{let e=r([1,"2",!0],m(1));expectTypeOf(e).toEqualTypeOf()});it("readonly mixed type tuple",()=>{let e=r([1,"2",!0],m(1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (tail) number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (tail) readonly number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("nonempty (head) number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});it("nonempty readonly (head) number array",()=>{let e=r([1,2,3],t(1));expectTypeOf(e).toEqualTypeOf()});describe("Indexed",()=>{it("number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("readonly number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("number 3-tuple",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("readonly number 3-tuple",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("named number 3-tuple",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("mixed type tuple",()=>{let e=r([1,"2",!0],(u,n)=>n);expectTypeOf(e).toEqualTypeOf()}),it("readonly mixed type tuple",()=>{let e=r([1,"2",!0],(u,n)=>n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (tail) number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (tail) readonly number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty (head) number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()}),it("nonempty readonly (head) number array",()=>{let e=r([1,2,3],(u,n)=>u+n);expectTypeOf(e).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkQUPOLS3Dcjs = require('./chunk-QUPOLS3D.cjs');require('./chunk-5AIMRZXJ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');it("trivially merges disjoint objects",()=>{let t=_chunkQUPOLS3Dcjs.a.call(void 0, {foo:"bar"},{bar:"baz"});expectTypeOf(t).toEqualTypeOf()});it("merges fully overlapping types",()=>{let t=_chunkQUPOLS3Dcjs.a.call(void 0, {foo:"bar"},{foo:"baz"});expectTypeOf(t).toEqualTypeOf()});it("merges semi-overlapping types",()=>{let t=_chunkQUPOLS3Dcjs.a.call(void 0, {foo:"bar",x:1},{foo:"baz",y:2});expectTypeOf(t).toEqualTypeOf()});it("deeply merges",()=>{let t=_chunkQUPOLS3Dcjs.a.call(void 0, {foo:{bar:"baz"}},{foo:{qux:"quux"}});expectTypeOf(t).toEqualTypeOf()});it("overrides types",()=>{let o={foo:{bar:"baz"}},e={foo:"qux"};expectTypeOf(_chunkQUPOLS3Dcjs.a.call(void 0, o,e)).toEqualTypeOf(),expectTypeOf(_chunkQUPOLS3Dcjs.a.call(void 0, e,o)).toEqualTypeOf()});it("doesn't spread arrays",()=>{let t=_chunkQUPOLS3Dcjs.a.call(void 0, {foo:["bar"]},{foo:["baz"]});expectTypeOf(t).toEqualTypeOf()});it("doesn't recurse into arrays",()=>{let o={foo:[{bar:"baz"}]},e={foo:[{bar:"hello, world"}]};expectTypeOf(_chunkQUPOLS3Dcjs.a.call(void 0, o,e)).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-QIYBHLRA.js";import"./chunk-HLL46USD.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";it("trivially merges disjoint objects",()=>{let t=a({foo:"bar"},{bar:"baz"});expectTypeOf(t).toEqualTypeOf()});it("merges fully overlapping types",()=>{let t=a({foo:"bar"},{foo:"baz"});expectTypeOf(t).toEqualTypeOf()});it("merges semi-overlapping types",()=>{let t=a({foo:"bar",x:1},{foo:"baz",y:2});expectTypeOf(t).toEqualTypeOf()});it("deeply merges",()=>{let t=a({foo:{bar:"baz"}},{foo:{qux:"quux"}});expectTypeOf(t).toEqualTypeOf()});it("overrides types",()=>{let o={foo:{bar:"baz"}},e={foo:"qux"};expectTypeOf(a(o,e)).toEqualTypeOf(),expectTypeOf(a(e,o)).toEqualTypeOf()});it("doesn't spread arrays",()=>{let t=a({foo:["bar"]},{foo:["baz"]});expectTypeOf(t).toEqualTypeOf()});it("doesn't recurse into arrays",()=>{let o={foo:[{bar:"baz"}]},e={foo:[{bar:"hello, world"}]};expectTypeOf(a(o,e)).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkCXZHGDSDcjs = require('./chunk-CXZHGDSD.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("source type overrides destination type",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {a:1,b:"hello"},{b:2})).toEqualTypeOf()});it("works with interfaces",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});test("a property can be replaced by another property that is not of the same type",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {stripUndefinedValues:!1},{stripUndefinedValues:!0})).toEqualTypeOf()});test("optional keys are enforced",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});test("indexed key type can be overwritten",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});test("destination with any",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});test("source with any",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});test("Type-fest issue #601?",()=>{expectTypeOf(_chunkCXZHGDSDcjs.a.call(void 0, {},{})).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-5HAUJEIR.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("source type overrides destination type",()=>{expectTypeOf(e({a:1,b:"hello"},{b:2})).toEqualTypeOf()});it("works with interfaces",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});test("a property can be replaced by another property that is not of the same type",()=>{expectTypeOf(e({stripUndefinedValues:!1},{stripUndefinedValues:!0})).toEqualTypeOf()});test("optional keys are enforced",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});test("indexed key type can be overwritten",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});test("destination with any",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});test("source with any",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});test("Type-fest issue #601?",()=>{expectTypeOf(e({},{})).toEqualTypeOf()});
|
package/dist/nth-by.d.cts
CHANGED
package/dist/nth-by.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk5UP2X3VYcjs = require('./chunk-5UP2X3VY.cjs');var _chunkMLLA7SGZcjs = require('./chunk-MLLA7SGZ.cjs');require('./chunk-5KO77UXQ.cjs');require('./chunk-FWQYL4Y4.cjs');it("works with regular arrays",()=>{let e=_chunk5UP2X3VYcjs.a.call(void 0, [1,2,3],0,_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});it("works with negative indices",()=>{let e=_chunk5UP2X3VYcjs.a.call(void 0, [1,2,3],-1,_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(e).toEqualTypeOf()});it("works with tuples",()=>{let r=_chunk5UP2X3VYcjs.a.call(void 0, ["a",!0,1],1,_chunkMLLA7SGZcjs.a.call(void 0, ));expectTypeOf(r).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-3DPIEAUX.js";import{a as t}from"./chunk-WUAU3LTQ.js";import"./chunk-UYH64IBH.js";import"./chunk-JXXXUJM5.js";it("works with regular arrays",()=>{let e=n([1,2,3],0,t());expectTypeOf(e).toEqualTypeOf()});it("works with negative indices",()=>{let e=n([1,2,3],-1,t());expectTypeOf(e).toEqualTypeOf()});it("works with tuples",()=>{let r=n(["a",!0,1],1,t());expectTypeOf(r).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkCIZWCFSYcjs = require('./chunk-CIZWCFSY.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkXUEOOIR6cjs = require('./chunk-XUEOOIR6.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("it should omit props",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("it should omit props",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {},_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()})});test("symbols are passed through",()=>{let e=Symbol("required"),n=Symbol("optional"),s=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(s).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{_chunkCIZWCFSYcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hello",c:!0},(e,n)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf(),!0))});test("number keys are passed as strings to the predicate",()=>{_chunkCIZWCFSYcjs.a.call(void 0, {123:"hello"},(e,n)=>(expectTypeOf(n).toEqualTypeOf(),!0))});test("handles type-predicates",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkEHJK4JRFcjs.a);expectTypeOf(e).toEqualTypeOf()});test("Makes wide types partial",()=>{let e=_chunkCIZWCFSYcjs.a.call(void 0, {a:0},_chunkD32D4HMPcjs.a.call(void 0, 1));expectTypeOf(e).toEqualTypeOf();let n=_chunkCIZWCFSYcjs.a.call(void 0, {a:1},s=>!0);expectTypeOf(n).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,p);expectTypeOf(n).toEqualTypeOf();let s=_chunkCIZWCFSYcjs.a.call(void 0, e,d);expectTypeOf(s).toEqualTypeOf();let u=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkXUEOOIR6cjs.a);expectTypeOf(u).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf(e)}),test("number keys",()=>{let n=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf()}),test("combined numbers and strings",()=>{let n=_chunkCIZWCFSYcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf()}),test("union of records",()=>{let e={},n=_chunkCIZWCFSYcjs.a.call(void 0, e,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(n).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, e,_chunkCIZWCFSYcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(s).toEqualTypeOf()})});function p(e){return e===void 0}function d(e){return typeof e=="object"&&e===null}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-ZIF7K2PC.js";import{a}from"./chunk-YTNT635N.js";import{a as l}from"./chunk-TBXEXWSK.js";import{a as o}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("it should omit props",()=>{let e=t({a:1,b:2,A:3,B:4},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=t({},r(!0));expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("it should omit props",()=>{let e=i({a:1,b:2,A:3,B:4},t(r(!0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let e=i({},t(r(!0)));expectTypeOf(e).toEqualTypeOf()})});test("symbols are passed through",()=>{let e=Symbol("required"),n=Symbol("optional"),s=t({},r(!0));expectTypeOf(s).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{t({[Symbol("mySymbol")]:1,b:"hello",c:!0},(e,n)=>(expectTypeOf(e).toEqualTypeOf(),expectTypeOf(n).toEqualTypeOf(),!0))});test("number keys are passed as strings to the predicate",()=>{t({123:"hello"},(e,n)=>(expectTypeOf(n).toEqualTypeOf(),!0))});test("handles type-predicates",()=>{let e=t({},o);expectTypeOf(e).toEqualTypeOf()});test("Makes wide types partial",()=>{let e=t({a:0},a(1));expectTypeOf(e).toEqualTypeOf();let n=t({a:1},s=>!0);expectTypeOf(n).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let e={},n=t(e,p);expectTypeOf(n).toEqualTypeOf();let s=t(e,d);expectTypeOf(s).toEqualTypeOf();let u=t(e,l);expectTypeOf(u).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let e={},n=t(e,r(!0));expectTypeOf(n).toEqualTypeOf(e)}),test("number keys",()=>{let n=t({},r(!0));expectTypeOf(n).toEqualTypeOf()}),test("combined numbers and strings",()=>{let n=t({},r(!0));expectTypeOf(n).toEqualTypeOf()}),test("union of records",()=>{let e={},n=t(e,r(!0));expectTypeOf(n).toEqualTypeOf();let s=i(e,t(r(!0)));expectTypeOf(s).toEqualTypeOf()})});function p(e){return e===void 0}function d(e){return typeof e=="object"&&e===null}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkINAPFYB2cjs = require('./chunk-INAPFYB2.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-G66EZBJS.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("non existing prop",()=>{_chunkINAPFYB2cjs.a.call(void 0, {a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let e=_chunkINAPFYB2cjs.a.call(void 0, {a:1},["a"]);expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{_chunkI6VXEY44cjs.a.call(void 0, {a:1,b:2,c:3,d:4},_chunkINAPFYB2cjs.a.call(void 0, ["not","in"]))}),test("complex type",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {a:1},_chunkINAPFYB2cjs.a.call(void 0, ["a"]));expectTypeOf(e).toEqualTypeOf()})});test("multiple keys",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {aProp:"p1",bProp:"p2"},_chunkINAPFYB2cjs.a.call(void 0, ["aProp","bProp"]));expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-KTMLSQQ7.js";import{a}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-73BYESBE.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("non existing prop",()=>{t({a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let e=t({a:1},["a"]);expectTypeOf(e).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{a({a:1,b:2,c:3,d:4},t(["not","in"]))}),test("complex type",()=>{let e=a({a:1},t(["a"]));expectTypeOf(e).toEqualTypeOf()})});test("multiple keys",()=>{let e=a({aProp:"p1",bProp:"p2"},t(["aProp","bProp"]));expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkR52BC2FHcjs = require('./chunk-R52BC2FH.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("simple array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});test("simple non-empty array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("simple tuple",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1,"a"]);expectTypeOf(e).toEqualTypeOf()});test("array with more than one item",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1,2]);expectTypeOf(e).toEqualTypeOf()});test("trivial empty array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});test("array with last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with two last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1,2]);expectTypeOf(e).toEqualTypeOf()});test("tuple with first and last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1,"a",2]);expectTypeOf(e).toEqualTypeOf()});test("tuple with optional and array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with all optional",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});test("simple readonly array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf()});test("simple non-empty readonly array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("simple readonly tuple",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1,"a"]);expectTypeOf(e).toEqualTypeOf()});test("readonly array with more than one item",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1,2]);expectTypeOf(e).toEqualTypeOf()});test("readonly trivial empty array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, []);expectTypeOf(e).toEqualTypeOf(void 0)});test("readonly array with last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, [1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with last",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with optional and array",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with all optional",()=>{let e=_chunkR52BC2FHcjs.a.call(void 0, ["a",1]);expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-VNU4MGEF.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("simple array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()});test("simple non-empty array",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("simple tuple",()=>{let e=t([1,"a"]);expectTypeOf(e).toEqualTypeOf()});test("array with more than one item",()=>{let e=t([1,2]);expectTypeOf(e).toEqualTypeOf()});test("trivial empty array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()});test("array with last",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with last",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with two last",()=>{let e=t(["a",1,2]);expectTypeOf(e).toEqualTypeOf()});test("tuple with first and last",()=>{let e=t([1,"a",2]);expectTypeOf(e).toEqualTypeOf()});test("tuple with optional and array",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});test("tuple with all optional",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});test("simple readonly array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf()});test("simple non-empty readonly array",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("simple readonly tuple",()=>{let e=t([1,"a"]);expectTypeOf(e).toEqualTypeOf()});test("readonly array with more than one item",()=>{let e=t([1,2]);expectTypeOf(e).toEqualTypeOf()});test("readonly trivial empty array",()=>{let e=t([]);expectTypeOf(e).toEqualTypeOf(void 0)});test("readonly array with last",()=>{let e=t([1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with last",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with optional and array",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});test("readonly tuple with all optional",()=>{let e=t(["a",1]);expectTypeOf(e).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkTA5NVANUcjs = require('./chunk-TA5NVANU.cjs');var _chunkYWTY4X2Rcjs = require('./chunk-YWTY4X2R.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("partition with type guard",()=>{let t=_chunkTA5NVANUcjs.a.call(void 0, [1,"a",2,"b"],_chunkYWTY4X2Rcjs.a);expectTypeOf(t).toEqualTypeOf()});test("partition with type guard in pipe",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,"a",2,"b"],_chunkTA5NVANUcjs.a.call(void 0, a=>typeof a=="number"));expectTypeOf(t).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-PL6B6X5G.js";import{a as e}from"./chunk-Q2HW4RVT.js";import{a as p}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("partition with type guard",()=>{let t=r([1,"a",2,"b"],e);expectTypeOf(t).toEqualTypeOf()});test("partition with type guard in pipe",()=>{let t=p([1,"a",2,"b"],r(a=>typeof a=="number"));expectTypeOf(t).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkGXVKH5OXcjs = require('./chunk-GXVKH5OX.cjs');var _chunk7XMQFPW7cjs = require('./chunk-7XMQFPW7.cjs');var _chunkYSTUBBOJcjs = require('./chunk-YSTUBBOJ.cjs');var _chunkD32D4HMPcjs = require('./chunk-D32D4HMP.cjs');var _chunkDAFN5EJRcjs = require('./chunk-DAFN5EJR.cjs');var _chunkEHJK4JRFcjs = require('./chunk-EHJK4JRF.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("it should pick props",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("it should pick props",()=>{let e=_chunkI6VXEY44cjs.a.call(void 0, {a:1,b:2,A:3,B:4},_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, {},_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(t).toEqualTypeOf()})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=_chunkGXVKH5OXcjs.a.call(void 0, {[t]:1,a:123},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{_chunkGXVKH5OXcjs.a.call(void 0, {[Symbol("mySymbol")]:1,b:"hello",c:!0},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),!0))});test("Makes wide types partial",()=>{let t=_chunkGXVKH5OXcjs.a.call(void 0, {a:0},_chunkD32D4HMPcjs.a.call(void 0, 1));expectTypeOf(t).toEqualTypeOf();let e=_chunkGXVKH5OXcjs.a.call(void 0, {a:1},s=>!0);expectTypeOf(e).toEqualTypeOf()});test("works with type-guards",()=>{let t=Symbol("test"),e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkEHJK4JRFcjs.a);expectTypeOf(e).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkYSTUBBOJcjs.a);expectTypeOf(e).toEqualTypeOf();let s=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunk7XMQFPW7cjs.a);expectTypeOf(s).toEqualTypeOf();let d=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkDAFN5EJRcjs.a);expectTypeOf(d).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf(t)}),test("number keys",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("combined numbers and strings",()=>{let e=_chunkGXVKH5OXcjs.a.call(void 0, {},_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf()}),test("union of records",()=>{let t={},e=_chunkGXVKH5OXcjs.a.call(void 0, t,_chunkWLNQOMKLcjs.a.call(void 0, !0));expectTypeOf(e).toEqualTypeOf();let s=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkGXVKH5OXcjs.a.call(void 0, _chunkWLNQOMKLcjs.a.call(void 0, !0)));expectTypeOf(s).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-LWPEZ7RI.js";import{a as p}from"./chunk-6BKLAQWR.js";import{a as u}from"./chunk-DNSXSQCO.js";import{a as o}from"./chunk-YTNT635N.js";import{a}from"./chunk-QPP664N4.js";import{a as l}from"./chunk-UYLVIAK4.js";import{a as i}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as r}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("it should pick props",()=>{let e=n({a:1,b:2,A:3,B:4},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=n({},r(!0));expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("it should pick props",()=>{let e=i({a:1,b:2,A:3,B:4},n(r(!0)));expectTypeOf(e).toEqualTypeOf()}),test("allow partial type",()=>{let t=i({},n(r(!0)));expectTypeOf(t).toEqualTypeOf()})});test("symbols are filtered out",()=>{let t=Symbol("mySymbol"),e=n({[t]:1,a:123},r(!0));expectTypeOf(e).toEqualTypeOf()});test("symbols are not passed to the predicate",()=>{n({[Symbol("mySymbol")]:1,b:"hello",c:!0},(t,e)=>(expectTypeOf(t).toEqualTypeOf(),expectTypeOf(e).toEqualTypeOf(),!0))});test("Makes wide types partial",()=>{let t=n({a:0},o(1));expectTypeOf(t).toEqualTypeOf();let e=n({a:1},s=>!0);expectTypeOf(e).toEqualTypeOf()});test("works with type-guards",()=>{let t=Symbol("test"),e=n({},l);expectTypeOf(e).toEqualTypeOf()});test("Works well with nullish type-guards",()=>{let t={},e=n(t,u);expectTypeOf(e).toEqualTypeOf();let s=n(t,p);expectTypeOf(s).toEqualTypeOf();let d=n(t,a);expectTypeOf(d).toEqualTypeOf()});describe("Records with non-narrowing predicates (Issue #696)",()=>{test("string keys",()=>{let t={},e=n(t,r(!0));expectTypeOf(e).toEqualTypeOf(t)}),test("number keys",()=>{let e=n({},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("combined numbers and strings",()=>{let e=n({},r(!0));expectTypeOf(e).toEqualTypeOf()}),test("union of records",()=>{let t={},e=n(t,r(!0));expectTypeOf(e).toEqualTypeOf();let s=i(t,n(r(!0)));expectTypeOf(s).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkE6MBOCICcjs = require('./chunk-E6MBOCIC.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("non existing prop",()=>{_chunkE6MBOCICcjs.a.call(void 0, {a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let t=_chunkE6MBOCICcjs.a.call(void 0, {a:1},["a"]);expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{_chunkI6VXEY44cjs.a.call(void 0, {a:1,b:2,c:3,d:4},_chunkE6MBOCICcjs.a.call(void 0, ["not","in"]))}),test("complex type",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, {a:1},_chunkE6MBOCICcjs.a.call(void 0, ["a"]));expectTypeOf(t).toEqualTypeOf()})});test("multiple keys",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, {aProp:"p1",bProp:"p2"},_chunkE6MBOCICcjs.a.call(void 0, ["aProp","bProp"]));expectTypeOf(t).toEqualTypeOf()});test("support inherited properties",()=>{class s{testProp(){return"abc"}}class t extends s{}let a=new t;expectTypeOf(_chunkE6MBOCICcjs.a.call(void 0, a,["testProp"])).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-ZUNMUNQT.js";import{a as r}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("non existing prop",()=>{e({a:1,b:2,c:3,d:4},["not","in"])}),test("complex type",()=>{let t=e({a:1},["a"]);expectTypeOf(t).toEqualTypeOf()})});describe("data last",()=>{test("non existing prop",()=>{r({a:1,b:2,c:3,d:4},e(["not","in"]))}),test("complex type",()=>{let t=r({a:1},e(["a"]));expectTypeOf(t).toEqualTypeOf()})});test("multiple keys",()=>{let t=r({aProp:"p1",bProp:"p2"},e(["aProp","bProp"]));expectTypeOf(t).toEqualTypeOf()});test("support inherited properties",()=>{class s{testProp(){return"abc"}}class t extends s{}let a=new t;expectTypeOf(e(a,["testProp"])).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkTKJ7YEHScjs = require('./chunk-TKJ7YEHS.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()});describe("numbers",()=>{test("arbitrary arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1,2]);expectTypeOf(t).toEqualTypeOf()})});describe("bigints",()=>{test("arbitrary arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n,3n]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, [1n,2n]);expectTypeOf(t).toEqualTypeOf()})});describe("dataLast",()=>{test("numbers",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3],_chunkTKJ7YEHScjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("bigints",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1n,2n,3n],_chunkTKJ7YEHScjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()})});it("doesn't allow mixed arrays",()=>{_chunkTKJ7YEHScjs.a.call(void 0, [1,2n])});describe("KNOWN ISSUES",()=>{it("Returns 1 (`number`) instead of 1n (`bigint`) for empty `bigint` arrays",()=>{let t=_chunkTKJ7YEHScjs.a.call(void 0, []);expectTypeOf(t).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-KG2TAX4E.js";import{a as r}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("empty arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()});describe("numbers",()=>{test("arbitrary arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=e([1,2]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=e([1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=e([1,2]);expectTypeOf(t).toEqualTypeOf()})});describe("bigints",()=>{test("arbitrary arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary readonly arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()}),test("arbitrary non-empty arrays",()=>{let t=e([1n,2n]);expectTypeOf(t).toEqualTypeOf()}),test("consts",()=>{let t=e([1n,2n,3n]);expectTypeOf(t).toEqualTypeOf()}),test("fixed-size tuples",()=>{let t=e([1n,2n]);expectTypeOf(t).toEqualTypeOf()})});describe("dataLast",()=>{test("numbers",()=>{let t=r([1,2,3],e());expectTypeOf(t).toEqualTypeOf()}),test("bigints",()=>{let t=r([1n,2n,3n],e());expectTypeOf(t).toEqualTypeOf()})});it("doesn't allow mixed arrays",()=>{e([1,2n])});describe("KNOWN ISSUES",()=>{it("Returns 1 (`number`) instead of 1n (`bigint`) for empty `bigint` arrays",()=>{let t=e([]);expectTypeOf(t).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkNIYVDIEQcjs = require('./chunk-NIYVDIEQ.cjs');var _chunkSXTSJOEEcjs = require('./chunk-SXTSJOEE.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-FWQYL4Y4.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("prop typing",()=>{let o=[{a:1}],r=_chunkNIYVDIEQcjs.a.call(void 0, o,_chunkSXTSJOEEcjs.a.call(void 0, "a"));expectTypeOf(r).toEqualTypeOf();let f=_chunkI6VXEY44cjs.a.call(void 0, o,_chunkNIYVDIEQcjs.a.call(void 0, _chunkSXTSJOEEcjs.a.call(void 0, "a")));expectTypeOf(f).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-J3YPWVVQ.js";import{a as p}from"./chunk-USNHLUEU.js";import{a as e}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JXXXUJM5.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("prop typing",()=>{let o=[{a:1}],r=t(o,p("a"));expectTypeOf(r).toEqualTypeOf();let f=e(o,t(p("a")));expectTypeOf(f).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkVEG55EJ6cjs = require('./chunk-VEG55EJ6.cjs');var _chunkMLLA7SGZcjs = require('./chunk-MLLA7SGZ.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');var _chunkWLNQOMKLcjs = require('./chunk-WLNQOMKL.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');test("string keys",()=>{let t=["a","b"],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "value"));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "value")));expectTypeOf(o).toEqualTypeOf()});test("number keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3)));expectTypeOf(o).toEqualTypeOf()});test("symbol keys",()=>{let t=[Symbol("a"),Symbol("b")],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, Symbol("c")));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, Symbol("c"))));expectTypeOf(o).toEqualTypeOf()});test("number constants",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, 3)));expectTypeOf(o).toEqualTypeOf()});test("string constants",()=>{let t=["a","b"],s=_chunkVEG55EJ6cjs.a.call(void 0, t,_chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "c"));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, _chunkMLLA7SGZcjs.a.call(void 0, ),_chunkWLNQOMKLcjs.a.call(void 0, "c")));expectTypeOf(o).toEqualTypeOf()});test("literal unions keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,r=>r%2===0?"odd":"even",_chunkWLNQOMKLcjs.a.call(void 0, "c"));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, r=>r%2===0?"odd":"even",_chunkWLNQOMKLcjs.a.call(void 0, "c")));expectTypeOf(o).toEqualTypeOf()});test("template string keys",()=>{let t=[1,2],s=_chunkVEG55EJ6cjs.a.call(void 0, t,r=>`prefix_${r}`,_chunkWLNQOMKLcjs.a.call(void 0, "value"));expectTypeOf(s).toEqualTypeOf();let o=_chunkI6VXEY44cjs.a.call(void 0, t,_chunkVEG55EJ6cjs.a.call(void 0, r=>`prefix_${r}`,_chunkWLNQOMKLcjs.a.call(void 0, "value")));expectTypeOf(o).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MKM3UJUV.js";import{a as c}from"./chunk-WUAU3LTQ.js";import{a as n}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import{a as e}from"./chunk-T5XG33UI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";test("string keys",()=>{let t=["a","b"],s=a(t,c(),e("value"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e("value")));expectTypeOf(o).toEqualTypeOf()});test("number keys",()=>{let t=[1,2],s=a(t,c(),e(3));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(3)));expectTypeOf(o).toEqualTypeOf()});test("symbol keys",()=>{let t=[Symbol("a"),Symbol("b")],s=a(t,c(),e(Symbol("c")));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(Symbol("c"))));expectTypeOf(o).toEqualTypeOf()});test("number constants",()=>{let t=[1,2],s=a(t,c(),e(3));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e(3)));expectTypeOf(o).toEqualTypeOf()});test("string constants",()=>{let t=["a","b"],s=a(t,c(),e("c"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(c(),e("c")));expectTypeOf(o).toEqualTypeOf()});test("literal unions keys",()=>{let t=[1,2],s=a(t,r=>r%2===0?"odd":"even",e("c"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(r=>r%2===0?"odd":"even",e("c")));expectTypeOf(o).toEqualTypeOf()});test("template string keys",()=>{let t=[1,2],s=a(t,r=>`prefix_${r}`,e("value"));expectTypeOf(s).toEqualTypeOf();let o=n(t,a(r=>`prefix_${r}`,e("value")));expectTypeOf(o).toEqualTypeOf()});
|
package/dist/rank-by.d.cts
CHANGED
package/dist/rank-by.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkH7YM6WEOcjs = require('./chunk-H7YM6WEO.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("data first",()=>{test("arrays",()=>{let t=_chunkH7YM6WEOcjs.a.call(void 0, [1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=_chunkH7YM6WEOcjs.a.call(void 0, [1,2,[!0],"a"]);expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=_chunkH7YM6WEOcjs.a.call(void 0, [1,"two","three"]);expectTypeOf(r).toEqualTypeOf()})});describe("data last",()=>{test("arrays",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,3],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=_chunkI6VXEY44cjs.a.call(void 0, [1,2,[!0],"a"],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=_chunkI6VXEY44cjs.a.call(void 0, [1,"two","three"],_chunkH7YM6WEOcjs.a.call(void 0, ));expectTypeOf(r).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-43F3C5SP.js";import{a}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("data first",()=>{test("arrays",()=>{let t=e([1,2,3]);expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=e([1,2,[!0],"a"]);expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=e([1,"two","three"]);expectTypeOf(r).toEqualTypeOf()})});describe("data last",()=>{test("arrays",()=>{let t=a([1,2,3],e());expectTypeOf(t).toEqualTypeOf()}),test("tuples",()=>{let t=a([1,2,[!0],"a"],e());expectTypeOf(t).toEqualTypeOf()}),test("variadic tuples",()=>{let r=a([1,"two","three"],e());expectTypeOf(r).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkPHSDYGVDcjs = require('./chunk-PHSDYGVD.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("sampleSize 0",()=>{it("on arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize < n",()=>{it("on arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],4);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize === n",()=>{it("empty array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],0);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],0);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize > n",()=>{it("empty array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],10);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],10);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],10);expectTypeOf(r).toEqualTypeOf()})});describe("non-const sampleSize",()=>{it("empty array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],5);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [],5);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, [1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=_chunkPHSDYGVDcjs.a.call(void 0, ["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-E2NINCLI.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("sampleSize 0",()=>{it("on arrays",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=n([1,2,3,4,5],0);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize < n",()=>{it("on arrays",()=>{let r=n([1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=n([1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=n([1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=n([1,2,3,4,5],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],4);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],4);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],4);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize === n",()=>{it("empty array",()=>{let r=n([],0);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=n([],0);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()})});describe("sampleSize > n",()=>{it("empty array",()=>{let r=n([],10);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=n([],10);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=n([1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=n([1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=n([1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=n([1,2,3,4,5],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],10);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],10);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],10);expectTypeOf(r).toEqualTypeOf()})});describe("non-const sampleSize",()=>{it("empty array",()=>{let r=n([],5);expectTypeOf(r).toEqualTypeOf()}),it("empty readonly array",()=>{let r=n([],5);expectTypeOf(r).toEqualTypeOf()}),it("on arrays",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly arrays",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples",()=>{let r=n([1,2,3,4,5],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest tail",()=>{let r=n([1,!0,"hello","world","yey"],5);expectTypeOf(r).toEqualTypeOf()}),it("on tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()}),it("on readonly tuples with rest head",()=>{let r=n(["yey","hello","world",!0,3],5);expectTypeOf(r).toEqualTypeOf()})});
|
package/dist/set-path.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkULMOKABQcjs = require('./chunk-ULMOKABQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');exports.setPath = _chunkULMOKABQcjs.a; exports.setPathImplementation = _chunkULMOKABQcjs.b;
|
package/dist/set-path.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
type Path<T, Prefix extends ReadonlyArray<unknown> =
|
|
1
|
+
type Path<T, Prefix extends ReadonlyArray<unknown> = []> = T extends ReadonlyArray<unknown> ? Path<T[number], [...Prefix, number]> | Prefix : T extends Record<PropertyKey, unknown> ? PathsOfObject<T, Prefix> | Prefix : Prefix;
|
|
2
2
|
type PathsOfObject<T, Prefix extends ReadonlyArray<unknown>> = {
|
|
3
3
|
[K in keyof T]-?: Path<T[K], readonly [...Prefix, K]>;
|
|
4
4
|
}[keyof T];
|
|
5
|
-
type ValueAtPath<T, TPath
|
|
6
|
-
infer Head,
|
|
5
|
+
type ValueAtPath<T, TPath> = TPath extends readonly [
|
|
6
|
+
infer Head extends keyof T,
|
|
7
7
|
...infer Rest
|
|
8
|
-
] ?
|
|
8
|
+
] ? ValueAtPath<T[Head], Rest> : T;
|
|
9
9
|
/**
|
|
10
10
|
* Sets the value at `path` of `object`.
|
|
11
11
|
*
|
package/dist/set-path.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
type Path<T, Prefix extends ReadonlyArray<unknown> =
|
|
1
|
+
type Path<T, Prefix extends ReadonlyArray<unknown> = []> = T extends ReadonlyArray<unknown> ? Path<T[number], [...Prefix, number]> | Prefix : T extends Record<PropertyKey, unknown> ? PathsOfObject<T, Prefix> | Prefix : Prefix;
|
|
2
2
|
type PathsOfObject<T, Prefix extends ReadonlyArray<unknown>> = {
|
|
3
3
|
[K in keyof T]-?: Path<T[K], readonly [...Prefix, K]>;
|
|
4
4
|
}[keyof T];
|
|
5
|
-
type ValueAtPath<T, TPath
|
|
6
|
-
infer Head,
|
|
5
|
+
type ValueAtPath<T, TPath> = TPath extends readonly [
|
|
6
|
+
infer Head extends keyof T,
|
|
7
7
|
...infer Rest
|
|
8
|
-
] ?
|
|
8
|
+
] ? ValueAtPath<T[Head], Rest> : T;
|
|
9
9
|
/**
|
|
10
10
|
* Sets the value at `path` of `object`.
|
|
11
11
|
*
|
package/dist/set-path.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-QHGCU3LJ.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";export{a as setPath,b as setPathImplementation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunkULMOKABQcjs = require('./chunk-ULMOKABQ.cjs');var _chunkI6VXEY44cjs = require('./chunk-I6VXEY44.cjs');require('./chunk-3X6SAJDQ.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');var t={a:{b:{c:1},e:[{f:{g:1}},{f:{g:1}}]},y:10};describe("data first",()=>{it("should correctly type value argument",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","e",1,"f","g"],"hello"),_chunkULMOKABQcjs.a.call(void 0, t,["a","e",1,"f","g"],123)}),it("should correctly type path argument",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","hello"],"hello"),_chunkULMOKABQcjs.a.call(void 0, t,["a","z"],123)}),test("should correctly type partial paths",()=>{_chunkULMOKABQcjs.a.call(void 0, t,["a","b"],123),_chunkULMOKABQcjs.a.call(void 0, t,["a","b"],{c:123})})});describe("data last",()=>{test("should correctly type value argument",()=>{_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","e",1,"f","g"],"hello")),_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","e",1,"f","g"],123))}),test("should correctly type path argument",()=>{_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","hello"],"hello")),_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","z"],123))}),test("should correctly type partial paths",()=>{_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","b"],123)),_chunkI6VXEY44cjs.a.call(void 0, t,_chunkULMOKABQcjs.a.call(void 0, ["a","b"],{c:123}))})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-QHGCU3LJ.js";import{a}from"./chunk-6ALZHU2N.js";import"./chunk-MYLYERXO.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";var t={a:{b:{c:1},e:[{f:{g:1}},{f:{g:1}}]},y:10};describe("data first",()=>{it("should correctly type value argument",()=>{e(t,["a","e",1,"f","g"],"hello"),e(t,["a","e",1,"f","g"],123)}),it("should correctly type path argument",()=>{e(t,["a","hello"],"hello"),e(t,["a","z"],123)}),test("should correctly type partial paths",()=>{e(t,["a","b"],123),e(t,["a","b"],{c:123})})});describe("data last",()=>{test("should correctly type value argument",()=>{a(t,e(["a","e",1,"f","g"],"hello")),a(t,e(["a","e",1,"f","g"],123))}),test("should correctly type path argument",()=>{a(t,e(["a","hello"],"hello")),a(t,e(["a","z"],123))}),test("should correctly type partial paths",()=>{a(t,e(["a","b"],123)),a(t,e(["a","b"],{c:123}))})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk7EJQW5L6cjs = require('./chunk-7EJQW5L6.cjs');require('./chunk-Y74ER22O.cjs');require('./chunk-7T4AVFYJ.cjs');describe("parameter enforcing",()=>{it("prevents setting the wrong type",()=>{_chunk7EJQW5L6cjs.a.call(void 0, {},"a",1)}),it("doesn't expand narrow types",()=>{_chunk7EJQW5L6cjs.a.call(void 0, {},"a","mouse")}),it("prevents setting `undefined` on optional fields",()=>{_chunk7EJQW5L6cjs.a.call(void 0, {},"a",void 0)}),it("prevents setting an unknown prop",()=>{_chunk7EJQW5L6cjs.a.call(void 0, {a:"foo"},"b","bar")})});it("narrows the prop type",()=>{let t=_chunk7EJQW5L6cjs.a.call(void 0, {},"a","hello");expectTypeOf(t).toEqualTypeOf()});it("keeps the prop optional when the key isn't literal",()=>{let t=_chunk7EJQW5L6cjs.a.call(void 0, {},"a","foo");expectTypeOf(t).toEqualTypeOf()});it("works on simple objects",()=>{let t=_chunk7EJQW5L6cjs.a.call(void 0, {},"a","foo");expectTypeOf(t).toEqualTypeOf()});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-QIM2PMWS.js";import"./chunk-JFXZ246Y.js";import"./chunk-KQGY2DBY.js";describe("parameter enforcing",()=>{it("prevents setting the wrong type",()=>{e({},"a",1)}),it("doesn't expand narrow types",()=>{e({},"a","mouse")}),it("prevents setting `undefined` on optional fields",()=>{e({},"a",void 0)}),it("prevents setting an unknown prop",()=>{e({a:"foo"},"b","bar")})});it("narrows the prop type",()=>{let t=e({},"a","hello");expectTypeOf(t).toEqualTypeOf()});it("keeps the prop optional when the key isn't literal",()=>{let t=e({},"a","foo");expectTypeOf(t).toEqualTypeOf()});it("works on simple objects",()=>{let t=e({},"a","foo");expectTypeOf(t).toEqualTypeOf()});
|