@fncts/base 0.0.13 → 0.0.16
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/_cjs/collection/compat/Array/api.cjs +10 -10
- package/_cjs/collection/compat/Array/derivations.cjs +96 -0
- package/_cjs/collection/compat/Array/derivations.cjs.map +1 -0
- package/_cjs/collection/compat/Array.cjs +13 -0
- package/_cjs/collection/compat/Array.cjs.map +1 -1
- package/_cjs/collection/compat.cjs +6 -0
- package/_cjs/collection/compat.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/derivations.cjs +45 -0
- package/_cjs/collection/immutable/Conc/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc.cjs +13 -0
- package/_cjs/collection/immutable/Conc.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +6 -6
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +9 -4
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs +41 -0
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs +13 -0
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs +62 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs +13 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs.map +1 -1
- package/_cjs/collection/immutable/List/definition.cjs +2 -2
- package/_cjs/collection/immutable/Vector/internal.cjs +1 -1
- package/_cjs/collection/immutable.cjs +6 -0
- package/_cjs/collection/immutable.cjs.map +1 -0
- package/_cjs/collection/mutable/HashMap.cjs +4 -0
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable.cjs +6 -0
- package/_cjs/collection/mutable.cjs.map +1 -0
- package/_cjs/collection/weak.cjs +6 -0
- package/_cjs/collection/weak.cjs.map +1 -0
- package/_cjs/collection.cjs +6 -0
- package/_cjs/collection.cjs.map +1 -0
- package/_cjs/control/Eval/definition.cjs +1 -1
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Z/api.cjs +9 -9
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +0 -1
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +2 -0
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/control.cjs +6 -0
- package/_cjs/control.cjs.map +1 -0
- package/_cjs/data/Cause/api/isEmpty.cjs +2 -0
- package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
- package/_cjs/data/Cause/api/linearize.cjs +2 -0
- package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +2 -0
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +4 -3
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/DecodeError/definition.cjs +13 -1
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/DecodeError/instances.cjs +6 -0
- package/_cjs/data/DecodeError/instances.cjs.map +1 -0
- package/_cjs/data/DecodeError.cjs +13 -0
- package/_cjs/data/DecodeError.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +2 -0
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +1 -1
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Environment/api.cjs +15 -25
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs +1 -2
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/Intervals.cjs +2 -2
- package/_cjs/data/Intervals.cjs.map +1 -1
- package/_cjs/data/Patch/api.cjs +5 -3
- package/_cjs/data/Patch/api.cjs.map +1 -1
- package/_cjs/data/Struct/api.cjs +2 -0
- package/_cjs/data/Struct/api.cjs.map +1 -1
- package/_cjs/data/Tag/constructors.cjs +2 -2
- package/_cjs/data/Tag/constructors.cjs.map +1 -1
- package/_cjs/data/Tag/definition.cjs +3 -3
- package/_cjs/data/Tag/definition.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +1 -1
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/string/api.cjs +1 -1
- package/_cjs/data.cjs +6 -0
- package/_cjs/data.cjs.map +1 -0
- package/_cjs/global.cjs +6 -0
- package/_cjs/global.cjs.map +1 -0
- package/_cjs/index.cjs +6 -0
- package/_cjs/index.cjs.map +1 -0
- package/_cjs/json.cjs +6 -0
- package/_cjs/json.cjs.map +1 -0
- package/_cjs/optics/At/definition.cjs +2 -0
- package/_cjs/optics/At/definition.cjs.map +1 -1
- package/_cjs/optics/Iso/definition.cjs +4 -0
- package/_cjs/optics/Iso/definition.cjs.map +1 -1
- package/_cjs/optics/Lens/definition.cjs +4 -0
- package/_cjs/optics/Lens/definition.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +2 -0
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Prism/definition.cjs +2 -0
- package/_cjs/optics/Prism/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +4 -0
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/optics.cjs +6 -0
- package/_cjs/optics.cjs.map +1 -0
- package/_cjs/typeclass/HashEq.cjs +2 -0
- package/_cjs/typeclass/HashEq.cjs.map +1 -1
- package/_cjs/typeclass/Monoid.cjs +2 -0
- package/_cjs/typeclass/Monoid.cjs.map +1 -1
- package/_cjs/typeclass/Ord/definition.cjs +2 -0
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
- package/_cjs/typeclass/Ord/instances.cjs +4 -3
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/util.cjs +6 -0
- package/_cjs/util.cjs.map +1 -0
- package/_mjs/collection/compat/Array/api.mjs +10 -10
- package/_mjs/collection/compat/Array/derivations.mjs +70 -0
- package/_mjs/collection/compat/Array/derivations.mjs.map +1 -0
- package/_mjs/collection/compat/Array.mjs +1 -0
- package/_mjs/collection/compat/Array.mjs.map +1 -1
- package/_mjs/collection/compat.mjs +2 -0
- package/_mjs/collection/compat.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api.mjs +1 -0
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/derivations.mjs +27 -0
- package/_mjs/collection/immutable/Conc/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc.mjs +2 -1
- package/_mjs/collection/immutable/Conc.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +1 -0
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +6 -6
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs +2 -2
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +7 -2
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs +25 -0
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs +1 -0
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +2 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs +39 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs.map +1 -1
- package/_mjs/collection/immutable/List/definition.mjs +2 -2
- package/_mjs/collection/immutable/SortedMap/api.mjs +1 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/internal.mjs +1 -1
- package/_mjs/collection/immutable.mjs +2 -0
- package/_mjs/collection/immutable.mjs.map +1 -0
- package/_mjs/collection/mutable/HashMap.mjs +4 -0
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable.mjs +2 -0
- package/_mjs/collection/mutable.mjs.map +1 -0
- package/_mjs/collection/weak.mjs +2 -0
- package/_mjs/collection/weak.mjs.map +1 -0
- package/_mjs/collection.mjs +2 -0
- package/_mjs/collection.mjs.map +1 -0
- package/_mjs/control/Eval/definition.mjs +1 -1
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/run.mjs +1 -0
- package/_mjs/control/Eval/run.mjs.map +1 -1
- package/_mjs/control/Z/api.mjs +9 -9
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +0 -1
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +1 -0
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/control.mjs +2 -0
- package/_mjs/control.mjs.map +1 -0
- package/_mjs/data/Branded/derivations.mjs +1 -0
- package/_mjs/data/Branded/derivations.mjs.map +1 -1
- package/_mjs/data/Cause/api/isEmpty.mjs +1 -0
- package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -1
- package/_mjs/data/Cause/api/linearize.mjs +1 -0
- package/_mjs/data/Cause/api/linearize.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +2 -1
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +1 -0
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +1 -0
- package/_mjs/data/Datum/api.mjs.map +1 -1
- package/_mjs/data/DecodeError/definition.mjs +9 -0
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/DecodeError/instances.mjs +2 -0
- package/_mjs/data/DecodeError/instances.mjs.map +1 -0
- package/_mjs/data/DecodeError.mjs +1 -0
- package/_mjs/data/DecodeError.mjs.map +1 -1
- package/_mjs/data/Decoder/api.mjs +1 -0
- package/_mjs/data/Decoder/api.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +1 -0
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +1 -1
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +1 -1
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +1 -1
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/Environment/api.mjs +12 -21
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs +1 -2
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/Intervals.mjs +2 -2
- package/_mjs/data/Intervals.mjs.map +1 -1
- package/_mjs/data/Patch/api.mjs +4 -3
- package/_mjs/data/Patch/api.mjs.map +1 -1
- package/_mjs/data/Struct/api.mjs +1 -0
- package/_mjs/data/Struct/api.mjs.map +1 -1
- package/_mjs/data/Tag/constructors.mjs +2 -2
- package/_mjs/data/Tag/constructors.mjs.map +1 -1
- package/_mjs/data/Tag/definition.mjs +3 -3
- package/_mjs/data/Tag/definition.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +1 -1
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/string/api.mjs +1 -1
- package/_mjs/data.mjs +2 -0
- package/_mjs/data.mjs.map +1 -0
- package/_mjs/global.mjs +2 -0
- package/_mjs/global.mjs.map +1 -0
- package/_mjs/index.mjs +2 -0
- package/_mjs/index.mjs.map +1 -0
- package/_mjs/json.mjs +2 -0
- package/_mjs/json.mjs.map +1 -0
- package/_mjs/optics/At/api.mjs +1 -0
- package/_mjs/optics/At/api.mjs.map +1 -1
- package/_mjs/optics/At/definition.mjs +1 -0
- package/_mjs/optics/At/definition.mjs.map +1 -1
- package/_mjs/optics/Index/api.mjs +1 -0
- package/_mjs/optics/Index/api.mjs.map +1 -1
- package/_mjs/optics/Iso/api.mjs +1 -0
- package/_mjs/optics/Iso/api.mjs.map +1 -1
- package/_mjs/optics/Iso/definition.mjs +2 -0
- package/_mjs/optics/Iso/definition.mjs.map +1 -1
- package/_mjs/optics/Lens/api.mjs +1 -0
- package/_mjs/optics/Lens/api.mjs.map +1 -1
- package/_mjs/optics/Lens/definition.mjs +2 -0
- package/_mjs/optics/Lens/definition.mjs.map +1 -1
- package/_mjs/optics/Optional/api/compose.mjs +1 -0
- package/_mjs/optics/Optional/api/compose.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +1 -0
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Prism/api/compose.mjs +1 -0
- package/_mjs/optics/Prism/api/compose.mjs.map +1 -1
- package/_mjs/optics/Prism/api/fromNullable.mjs +1 -0
- package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -1
- package/_mjs/optics/Prism/api/just.mjs +1 -0
- package/_mjs/optics/Prism/api/just.mjs.map +1 -1
- package/_mjs/optics/Prism/definition.mjs +1 -0
- package/_mjs/optics/Prism/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +1 -0
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +1 -0
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +2 -0
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/optics.mjs +2 -0
- package/_mjs/optics.mjs.map +1 -0
- package/_mjs/typeclass/Eq/derivations.mjs +1 -0
- package/_mjs/typeclass/Eq/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Guard/api.mjs +1 -0
- package/_mjs/typeclass/Guard/api.mjs.map +1 -1
- package/_mjs/typeclass/HashEq.mjs +1 -0
- package/_mjs/typeclass/HashEq.mjs.map +1 -1
- package/_mjs/typeclass/Monoid.mjs +1 -0
- package/_mjs/typeclass/Monoid.mjs.map +1 -1
- package/_mjs/typeclass/Ord/definition.mjs +1 -0
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
- package/_mjs/typeclass/Ord/instances.mjs +3 -0
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs +1 -0
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs +1 -0
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/util.mjs +2 -0
- package/_mjs/util.mjs.map +1 -0
- package/_src/collection/compat/Array/api.ts +10 -10
- package/_src/collection/compat/Array/definition.ts +3 -3
- package/_src/collection/compat/Array/derivations.ts +85 -0
- package/_src/collection/compat/Array.ts +1 -0
- package/_src/collection/compat/Record/instances.ts +0 -1
- package/_src/collection/compat.ts +4 -0
- package/_src/collection/immutable/Conc/definition.ts +11 -10
- package/_src/collection/immutable/Conc/derivations.ts +28 -0
- package/_src/collection/immutable/Conc.ts +1 -0
- package/_src/collection/immutable/ImmutableArray/api.ts +6 -6
- package/_src/collection/immutable/ImmutableArray/constructors.ts +2 -2
- package/_src/collection/immutable/ImmutableArray/definition.ts +3 -0
- package/_src/collection/immutable/ImmutableArray/derivations.ts +28 -0
- package/_src/collection/immutable/ImmutableArray/instances.ts +5 -0
- package/_src/collection/immutable/ImmutableArray.ts +1 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +2 -2
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +2 -2
- package/_src/collection/immutable/ImmutableNonEmptyArray/derivations.ts +44 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray.ts +1 -0
- package/_src/collection/immutable/List/definition.ts +2 -2
- package/_src/collection/immutable/Vector/definition.ts +1 -1
- package/_src/collection/immutable/Vector/internal.ts +1 -1
- package/_src/collection/immutable.ts +12 -0
- package/_src/collection/mutable/HashMap.ts +4 -0
- package/_src/collection/mutable.ts +6 -0
- package/_src/collection/weak.ts +4 -0
- package/_src/collection.ts +7 -0
- package/_src/control/Eval/definition.ts +1 -1
- package/_src/control/Z/api.ts +24 -27
- package/_src/control/Z/definition.ts +6 -7
- package/_src/control/Z/runtime.ts +4 -4
- package/_src/control.ts +5 -0
- package/_src/data/DecodeError/definition.ts +8 -0
- package/_src/data/DecodeError/instances.ts +0 -0
- package/_src/data/DecodeError.ts +1 -0
- package/_src/data/Either/definition.ts +1 -1
- package/_src/data/Environment/api.ts +8 -14
- package/_src/data/Environment/definition.ts +1 -2
- package/_src/data/Maybe/definition.ts +2 -2
- package/_src/data/Patch/api.ts +4 -4
- package/_src/data/Tag/constructors.ts +2 -2
- package/_src/data/Tag/definition.ts +3 -2
- package/_src/data/These/definition.ts +1 -1
- package/_src/data/string/api.ts +1 -1
- package/_src/data.ts +35 -0
- package/_src/global.ts +252 -0
- package/_src/index.ts +8 -0
- package/_src/json.ts +5 -0
- package/_src/optics.ts +12 -0
- package/_src/typeclass/Showable/show.ts +2 -2
- package/_src/util.ts +8 -0
- package/collection/compat/Array/api.d.ts +10 -10
- package/collection/compat/Array/definition.d.ts +3 -3
- package/collection/compat/Array/derivations.d.ts +24 -0
- package/collection/compat/Array.d.ts +1 -0
- package/collection/compat.d.ts +2 -0
- package/collection/immutable/Conc/definition.d.ts +17 -16
- package/collection/immutable/Conc/derivations.d.ts +14 -0
- package/collection/immutable/Conc.d.ts +1 -0
- package/collection/immutable/ImmutableArray/api.d.ts +6 -6
- package/collection/immutable/ImmutableArray/constructors.d.ts +2 -2
- package/collection/immutable/ImmutableArray/definition.d.ts +4 -0
- package/collection/immutable/ImmutableArray/derivations.d.ts +14 -0
- package/collection/immutable/ImmutableArray.d.ts +1 -0
- package/collection/immutable/ImmutableNonEmptyArray/constructors.d.ts +2 -2
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +2 -2
- package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +14 -0
- package/collection/immutable/ImmutableNonEmptyArray.d.ts +1 -0
- package/collection/immutable/List/definition.d.ts +2 -2
- package/collection/immutable/Vector/definition.d.ts +1 -1
- package/collection/immutable/Vector/internal.d.ts +1 -1
- package/collection/immutable.d.ts +10 -0
- package/collection/mutable/HashMap.d.ts +1 -0
- package/collection/mutable.d.ts +4 -0
- package/collection/weak.d.ts +2 -0
- package/collection.d.ts +5 -0
- package/control/Z/api.d.ts +24 -24
- package/control/Z/definition.d.ts +6 -6
- package/control/Z/runtime.d.ts +4 -4
- package/control.d.ts +3 -0
- package/data/DecodeError/definition.d.ts +6 -0
- package/data/DecodeError/instances.d.ts +1 -0
- package/data/DecodeError.d.ts +1 -0
- package/data/Environment/definition.d.ts +2 -3
- package/data/Maybe/definition.d.ts +4 -2
- package/data/Tag/constructors.d.ts +1 -1
- package/data/Tag/definition.d.ts +2 -1
- package/data/string/api.d.ts +1 -1
- package/data.d.ts +33 -0
- package/global.d.ts +237 -0
- package/index.d.ts +8 -0
- package/json.d.ts +3 -0
- package/optics.d.ts +10 -0
- package/package.json +6 -2
- package/typeclass/Showable/show.d.ts +1 -1
- package/util.d.ts +6 -0
|
@@ -23,7 +23,7 @@ const _nothingHash = Hashable.string("fncts.Nothing");
|
|
|
23
23
|
* @tsplus companion fncts.MaybeOps
|
|
24
24
|
*/
|
|
25
25
|
export class Maybe<A> {
|
|
26
|
-
|
|
26
|
+
declare _A: () => A;
|
|
27
27
|
readonly _typeId: MaybeTypdId = MaybeTypeId;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -61,7 +61,7 @@ export class Nothing extends Maybe<never> {
|
|
|
61
61
|
/**
|
|
62
62
|
* @tsplus unify fncts.Maybe
|
|
63
63
|
*/
|
|
64
|
-
export function unifyMaybe<X extends Maybe<any>>(self: X): Maybe<[X] extends [
|
|
64
|
+
export function unifyMaybe<X extends Maybe<any>>(self: X): Maybe<[X] extends [{ _A: () => infer A }] ? A : never> {
|
|
65
65
|
return self;
|
|
66
66
|
}
|
|
67
67
|
|
package/_src/data/Patch/api.ts
CHANGED
|
@@ -49,14 +49,14 @@ const OrdEnvironmentMap = Number.Ord.contramap((_: readonly [Tag<unknown>, reado
|
|
|
49
49
|
* @tsplus static fncts.Environment.PatchOps diff
|
|
50
50
|
*/
|
|
51
51
|
export function diff<In, Out>(oldValue: Environment<In>, newValue: Environment<Out>): Patch<In, Out> {
|
|
52
|
-
const sorted = newValue.map.toArray
|
|
52
|
+
const sorted = newValue.map.toArray;
|
|
53
53
|
const [missingServices, patch] = sorted.foldLeft(
|
|
54
54
|
[oldValue.map.beginMutation, Patch.empty() as Patch<any, any>],
|
|
55
|
-
([map, patch], [tag,
|
|
55
|
+
([map, patch], [tag, newService]) =>
|
|
56
56
|
map.get(tag).match(
|
|
57
57
|
() => [map.remove(tag), patch.compose(new AddService(newService, tag))],
|
|
58
|
-
(
|
|
59
|
-
if (oldService === newService
|
|
58
|
+
(oldService) => {
|
|
59
|
+
if (oldService === newService) {
|
|
60
60
|
return [map.remove(tag), patch];
|
|
61
61
|
} else {
|
|
62
62
|
return [map.remove(tag), patch.compose(new UpdateService((_: any) => newService, tag))];
|
|
@@ -15,10 +15,11 @@ export class Tag<in out T> implements Hashable, Equatable {
|
|
|
15
15
|
declare _T: (_: T) => T;
|
|
16
16
|
readonly _typeId: TagTypeId = TagTypeId;
|
|
17
17
|
private static counter = new AtomicNumber(0);
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
constructor(readonly id: string) {}
|
|
19
20
|
|
|
20
21
|
get [Symbol.hash](): number {
|
|
21
|
-
return Hashable.combine(_tagHash, Hashable.
|
|
22
|
+
return Hashable.combine(_tagHash, Hashable.string(this.id));
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
[Symbol.equals](that: unknown): boolean {
|
package/_src/data/string/api.ts
CHANGED
|
@@ -175,7 +175,7 @@ export const under = Pipeable(under_);
|
|
|
175
175
|
/**
|
|
176
176
|
* Join newline-separated strings together.
|
|
177
177
|
*
|
|
178
|
-
* @tsplus getter fncts.
|
|
178
|
+
* @tsplus getter fncts.ImmutableArray unlines
|
|
179
179
|
*/
|
|
180
180
|
export function unlines(as: ReadonlyArray<string>): string {
|
|
181
181
|
return as.join("\n");
|
package/_src/data.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// codegen:start { preset: type-barrel, include: ./data/*.ts }
|
|
2
|
+
export type {} from "./data/bigint.js";
|
|
3
|
+
export type {} from "./data/boolean.js";
|
|
4
|
+
export type {} from "./data/Branded.js";
|
|
5
|
+
export type {} from "./data/Byte.js";
|
|
6
|
+
export type {} from "./data/CaseClass.js";
|
|
7
|
+
export type {} from "./data/Cause.js";
|
|
8
|
+
export type {} from "./data/Const.js";
|
|
9
|
+
export type {} from "./data/DecodeError.js";
|
|
10
|
+
export type {} from "./data/Decoder.js";
|
|
11
|
+
export type {} from "./data/Duration.js";
|
|
12
|
+
export type {} from "./data/Either.js";
|
|
13
|
+
export type {} from "./data/Environment.js";
|
|
14
|
+
export type {} from "./data/exceptions.js";
|
|
15
|
+
export type {} from "./data/ExecutionStrategy.js";
|
|
16
|
+
export type {} from "./data/Exit.js";
|
|
17
|
+
export type {} from "./data/FiberId.js";
|
|
18
|
+
export type {} from "./data/function.js";
|
|
19
|
+
export type {} from "./data/Identity.js";
|
|
20
|
+
export type {} from "./data/Interval.js";
|
|
21
|
+
export type {} from "./data/Intervals.js";
|
|
22
|
+
export type {} from "./data/Maybe.js";
|
|
23
|
+
export type {} from "./data/Newtype.js";
|
|
24
|
+
export type {} from "./data/number.js";
|
|
25
|
+
export type {} from "./data/object.js";
|
|
26
|
+
export type {} from "./data/Patch.js";
|
|
27
|
+
export type {} from "./data/Predicate.js";
|
|
28
|
+
export type {} from "./data/Refinement.js";
|
|
29
|
+
export type {} from "./data/string.js";
|
|
30
|
+
export type {} from "./data/Tag.js";
|
|
31
|
+
export type {} from "./data/These.js";
|
|
32
|
+
export type {} from "./data/Trace.js";
|
|
33
|
+
export type {} from "./data/TraceElement.js";
|
|
34
|
+
export type {} from "./data/Zipped.js";
|
|
35
|
+
// codegen:end
|
package/_src/global.ts
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tsplus global
|
|
3
|
+
*/
|
|
4
|
+
import type {} from "@fncts/base";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @tsplus global
|
|
8
|
+
*/
|
|
9
|
+
import {} from "@fncts/base/collection/compat/Array";
|
|
10
|
+
/**
|
|
11
|
+
* @tsplus global
|
|
12
|
+
*/
|
|
13
|
+
import { Conc, ConcBuilder } from "@fncts/base/collection/immutable/Conc";
|
|
14
|
+
/**
|
|
15
|
+
* @tsplus global
|
|
16
|
+
*/
|
|
17
|
+
import { Dictionary } from "@fncts/base/collection/immutable/Dictionary/definition";
|
|
18
|
+
/**
|
|
19
|
+
* @tsplus global
|
|
20
|
+
*/
|
|
21
|
+
import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
|
|
22
|
+
/**
|
|
23
|
+
* @tsplus global
|
|
24
|
+
*/
|
|
25
|
+
import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
|
26
|
+
/**
|
|
27
|
+
* @tsplus global
|
|
28
|
+
*/
|
|
29
|
+
import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
|
30
|
+
/**
|
|
31
|
+
* @tsplus global
|
|
32
|
+
*/
|
|
33
|
+
import {
|
|
34
|
+
ImmutableNonEmptyArray,
|
|
35
|
+
NonEmptyArray,
|
|
36
|
+
ReadonlyNonEmptyArray,
|
|
37
|
+
} from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
|
|
38
|
+
/**
|
|
39
|
+
* @tsplus global
|
|
40
|
+
*/
|
|
41
|
+
import { Cons, List, Nil } from "@fncts/base/collection/immutable/List/definition";
|
|
42
|
+
/**
|
|
43
|
+
* @tsplus global
|
|
44
|
+
*/
|
|
45
|
+
import { Queue as ImmutableQueue } from "@fncts/base/collection/immutable/Queue/definition";
|
|
46
|
+
/**
|
|
47
|
+
* @tsplus global
|
|
48
|
+
*/
|
|
49
|
+
import { RoseTree } from "@fncts/base/collection/immutable/RoseTree";
|
|
50
|
+
/**
|
|
51
|
+
* @tsplus global
|
|
52
|
+
*/
|
|
53
|
+
import { SortedMap } from "@fncts/base/collection/immutable/SortedMap/definition";
|
|
54
|
+
/**
|
|
55
|
+
* @tsplus global
|
|
56
|
+
*/
|
|
57
|
+
import { Vector } from "@fncts/base/collection/immutable/Vector";
|
|
58
|
+
/**
|
|
59
|
+
* @tsplus global
|
|
60
|
+
*/
|
|
61
|
+
import { Iterable } from "@fncts/base/collection/Iterable/definition";
|
|
62
|
+
/**
|
|
63
|
+
* @tsplus global
|
|
64
|
+
*/
|
|
65
|
+
import { HashMap as MutableHashMap } from "@fncts/base/collection/mutable/HashMap";
|
|
66
|
+
/**
|
|
67
|
+
* @tsplus global
|
|
68
|
+
*/
|
|
69
|
+
import { HashSet as MutableHashSet } from "@fncts/base/collection/mutable/HashSet";
|
|
70
|
+
/**
|
|
71
|
+
* @tsplus global
|
|
72
|
+
*/
|
|
73
|
+
import { ListBuffer } from "@fncts/base/collection/mutable/ListBuffer";
|
|
74
|
+
/**
|
|
75
|
+
* @tsplus global
|
|
76
|
+
*/
|
|
77
|
+
import { Eval } from "@fncts/base/control/Eval/definition";
|
|
78
|
+
/**
|
|
79
|
+
* @tsplus global
|
|
80
|
+
*/
|
|
81
|
+
import { LazyValue } from "@fncts/base/control/LazyValue";
|
|
82
|
+
/**
|
|
83
|
+
* @tsplus global
|
|
84
|
+
*/
|
|
85
|
+
import { Z } from "@fncts/base/control/Z/definition";
|
|
86
|
+
/**
|
|
87
|
+
* @tsplus global
|
|
88
|
+
*/
|
|
89
|
+
import { Byte } from "@fncts/base/data/Byte";
|
|
90
|
+
/**
|
|
91
|
+
* @tsplus global
|
|
92
|
+
*/
|
|
93
|
+
import { CaseClass } from "@fncts/base/data/CaseClass";
|
|
94
|
+
/**
|
|
95
|
+
* @tsplus global
|
|
96
|
+
*/
|
|
97
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
|
98
|
+
/**
|
|
99
|
+
* @tsplus global
|
|
100
|
+
*/
|
|
101
|
+
import { Const } from "@fncts/base/data/Const/definition";
|
|
102
|
+
/**
|
|
103
|
+
* @tsplus global
|
|
104
|
+
*/
|
|
105
|
+
import { Datum } from "@fncts/base/data/Datum/definition";
|
|
106
|
+
/**
|
|
107
|
+
* @tsplus global
|
|
108
|
+
*/
|
|
109
|
+
import { DatumEither } from "@fncts/base/data/DatumEither/definition";
|
|
110
|
+
/**
|
|
111
|
+
* @tsplus global
|
|
112
|
+
*/
|
|
113
|
+
import { Decoder } from "@fncts/base/data/Decoder";
|
|
114
|
+
/**
|
|
115
|
+
* @tsplus global
|
|
116
|
+
*/
|
|
117
|
+
import { Duration } from "@fncts/base/data/Duration/definition";
|
|
118
|
+
/**
|
|
119
|
+
* @tsplus global
|
|
120
|
+
*/
|
|
121
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
|
122
|
+
/**
|
|
123
|
+
* @tsplus global
|
|
124
|
+
*/
|
|
125
|
+
import { Environment } from "@fncts/base/data/Environment/definition";
|
|
126
|
+
/**
|
|
127
|
+
* @tsplus global
|
|
128
|
+
*/
|
|
129
|
+
import {
|
|
130
|
+
ArrayIndexOutOfBoundsError,
|
|
131
|
+
IllegalArgumentError,
|
|
132
|
+
IllegalStateError,
|
|
133
|
+
IndexOutOfBoundsError,
|
|
134
|
+
InterruptedException,
|
|
135
|
+
InvalidCapacityError,
|
|
136
|
+
isInterruptedException,
|
|
137
|
+
isInvalidCapacityError,
|
|
138
|
+
NoSuchElementError,
|
|
139
|
+
} from "@fncts/base/data/exceptions";
|
|
140
|
+
/**
|
|
141
|
+
* @tsplus global
|
|
142
|
+
*/
|
|
143
|
+
import { ExecutionStrategy } from "@fncts/base/data/ExecutionStrategy";
|
|
144
|
+
/**
|
|
145
|
+
* @tsplus global
|
|
146
|
+
*/
|
|
147
|
+
import { Exit } from "@fncts/base/data/Exit/definition";
|
|
148
|
+
/**
|
|
149
|
+
* @tsplus global
|
|
150
|
+
*/
|
|
151
|
+
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
|
152
|
+
/**
|
|
153
|
+
* @tsplus global
|
|
154
|
+
*/
|
|
155
|
+
import { unsafeCoerce } from "@fncts/base/data/function/api";
|
|
156
|
+
/**
|
|
157
|
+
* @tsplus global
|
|
158
|
+
*/
|
|
159
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
|
160
|
+
/**
|
|
161
|
+
* @tsplus global
|
|
162
|
+
*/
|
|
163
|
+
import { Identity } from "@fncts/base/data/Identity/definition";
|
|
164
|
+
/**
|
|
165
|
+
* @tsplus global
|
|
166
|
+
*/
|
|
167
|
+
import { Interval } from "@fncts/base/data/Interval";
|
|
168
|
+
/**
|
|
169
|
+
* @tsplus global
|
|
170
|
+
*/
|
|
171
|
+
import { Intervals } from "@fncts/base/data/Intervals";
|
|
172
|
+
/**
|
|
173
|
+
* @tsplus global
|
|
174
|
+
*/
|
|
175
|
+
import { Just, Maybe, MaybeTag, Nothing } from "@fncts/base/data/Maybe/definition";
|
|
176
|
+
/**
|
|
177
|
+
* @tsplus global
|
|
178
|
+
*/
|
|
179
|
+
import { Newtype, NewtypeIso } from "@fncts/base/data/Newtype";
|
|
180
|
+
/**
|
|
181
|
+
* @tsplus global
|
|
182
|
+
*/
|
|
183
|
+
import {} from "@fncts/base/data/number/definition";
|
|
184
|
+
import {} from "@fncts/base/data/object/definition";
|
|
185
|
+
/**
|
|
186
|
+
* @tsplus global
|
|
187
|
+
*/
|
|
188
|
+
import {} from "@fncts/base/data/object/definition";
|
|
189
|
+
/**
|
|
190
|
+
* @tsplus global
|
|
191
|
+
*/
|
|
192
|
+
import { Predicate, PredicateWithIndex } from "@fncts/base/data/Predicate/definition";
|
|
193
|
+
/**
|
|
194
|
+
* @tsplus global
|
|
195
|
+
*/
|
|
196
|
+
import { Refinement, RefinementWithIndex } from "@fncts/base/data/Refinement/definition";
|
|
197
|
+
/**
|
|
198
|
+
* @tsplus global
|
|
199
|
+
*/
|
|
200
|
+
import {} from "@fncts/base/data/string/definition";
|
|
201
|
+
/**
|
|
202
|
+
* @tsplus global
|
|
203
|
+
*/
|
|
204
|
+
import { Struct } from "@fncts/base/data/Struct/definition";
|
|
205
|
+
/**
|
|
206
|
+
* @tsplus global
|
|
207
|
+
*/
|
|
208
|
+
import { Tag } from "@fncts/base/data/Tag/definition";
|
|
209
|
+
/**
|
|
210
|
+
* @tsplus global
|
|
211
|
+
*/
|
|
212
|
+
import { These } from "@fncts/base/data/These";
|
|
213
|
+
/**
|
|
214
|
+
* @tsplus global
|
|
215
|
+
*/
|
|
216
|
+
import { Trace } from "@fncts/base/data/Trace/definition";
|
|
217
|
+
/**
|
|
218
|
+
* @tsplus global
|
|
219
|
+
*/
|
|
220
|
+
import { TraceElement } from "@fncts/base/data/TraceElement/definition";
|
|
221
|
+
/**
|
|
222
|
+
* @tsplus global
|
|
223
|
+
*/
|
|
224
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
|
225
|
+
/**
|
|
226
|
+
* @tsplus global
|
|
227
|
+
*/
|
|
228
|
+
import { Stack } from "@fncts/base/internal/Stack";
|
|
229
|
+
/**
|
|
230
|
+
* @tsplus global
|
|
231
|
+
*/
|
|
232
|
+
import { Equatable } from "@fncts/base/typeclass/Equatable";
|
|
233
|
+
/**
|
|
234
|
+
* @tsplus global
|
|
235
|
+
*/
|
|
236
|
+
import { Guard } from "@fncts/base/typeclass/Guard";
|
|
237
|
+
/**
|
|
238
|
+
* @tsplus global
|
|
239
|
+
*/
|
|
240
|
+
import { Has } from "@fncts/base/typeclass/Has";
|
|
241
|
+
/**
|
|
242
|
+
* @tsplus global
|
|
243
|
+
*/
|
|
244
|
+
import { Hashable } from "@fncts/base/typeclass/Hashable";
|
|
245
|
+
/**
|
|
246
|
+
* @tsplus global
|
|
247
|
+
*/
|
|
248
|
+
import { hasTypeId, isByte, isObject } from "@fncts/base/util/predicates";
|
|
249
|
+
/**
|
|
250
|
+
* @tsplus global
|
|
251
|
+
*/
|
|
252
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
package/_src/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type {} from "./collection.js";
|
|
2
|
+
export type {} from "./control.js";
|
|
3
|
+
export type {} from "./data.js";
|
|
4
|
+
export type {} from "./json.js";
|
|
5
|
+
export type {} from "./optics.js";
|
|
6
|
+
export type {} from "./typeclass.js";
|
|
7
|
+
export type {} from "./types.js";
|
|
8
|
+
export type {} from "./util.js";
|
package/_src/json.ts
ADDED
package/_src/optics.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// codegen:start { preset: type-barrel, include: ./optics/*.ts }
|
|
2
|
+
export type {} from "./optics/At.js";
|
|
3
|
+
export type {} from "./optics/Fold.js";
|
|
4
|
+
export type {} from "./optics/Getter.js";
|
|
5
|
+
export type {} from "./optics/Index.js";
|
|
6
|
+
export type {} from "./optics/Iso.js";
|
|
7
|
+
export type {} from "./optics/Lens.js";
|
|
8
|
+
export type {} from "./optics/Optional.js";
|
|
9
|
+
export type {} from "./optics/Prism.js";
|
|
10
|
+
export type {} from "./optics/Setter.js";
|
|
11
|
+
export type {} from "./optics/Traversal.js";
|
|
12
|
+
// codegen:end
|
|
@@ -72,7 +72,7 @@ export interface ShowOptions {
|
|
|
72
72
|
|
|
73
73
|
export class ShowContext extends CaseClass<ShowContextArgs> {}
|
|
74
74
|
|
|
75
|
-
export type ShowComputationZ<A> = Z<never, ShowContext, ShowContext,
|
|
75
|
+
export type ShowComputationZ<A> = Z<never, ShowContext, ShowContext, never, never, A>;
|
|
76
76
|
export type ShowComputation = ShowComputationZ<string>;
|
|
77
77
|
export type ShowComputationChunk = ShowComputationZ<Conc<string>>;
|
|
78
78
|
|
|
@@ -240,7 +240,7 @@ function getInspectionInfo(context: ShowContext, value: object, typedArray?: str
|
|
|
240
240
|
|
|
241
241
|
if (value[Symbol.iterator as keyof typeof value] || constructor === null) {
|
|
242
242
|
noIterator = false;
|
|
243
|
-
if (Conc.
|
|
243
|
+
if (Conc.is(value)) {
|
|
244
244
|
braces = [`Chunk (${(value as Conc<unknown>).length}) [`, "]"];
|
|
245
245
|
if ((value as Conc<unknown>).length == 0) {
|
|
246
246
|
return inspectionEarlyReturn(`${braces[0]}]`);
|
package/_src/util.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// codegen:start { preset: type-barrel, include: ./util/*.ts }
|
|
2
|
+
export type {} from "./util/AnsiFormat.js";
|
|
3
|
+
export type {} from "./util/assert.js";
|
|
4
|
+
export type {} from "./util/pattern.js";
|
|
5
|
+
export type {} from "./util/PCGRandom.js";
|
|
6
|
+
export type {} from "./util/predicates.js";
|
|
7
|
+
export type {} from "./util/rand.js";
|
|
8
|
+
// codegen:end
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { ReadonlyNonEmptyArray } from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
|
|
2
2
|
import type { Eq } from "@fncts/base/typeclass";
|
|
3
3
|
/**
|
|
4
|
-
* @tsplus getter fncts.
|
|
5
|
-
* @tsplus getter fncts.
|
|
4
|
+
* @tsplus getter fncts.Array elem
|
|
5
|
+
* @tsplus getter fncts.ReadonlyArray elem
|
|
6
6
|
* @tsplus location "@fncts/base/collection/compat/Array/api"
|
|
7
7
|
*/
|
|
8
8
|
export declare function elem<A>(self: ReadonlyArray<A>): (eq: Eq<A>) => (a: A) => boolean;
|
|
9
9
|
/**
|
|
10
|
-
* @tsplus fluent fncts.
|
|
11
|
-
* @tsplus fluent fncts.
|
|
10
|
+
* @tsplus fluent fncts.Array isEmpty
|
|
11
|
+
* @tsplus fluent fncts.ReadonlyArray isEmpty
|
|
12
12
|
* @tsplus location "@fncts/base/collection/compat/Array/api"
|
|
13
13
|
*/
|
|
14
14
|
export declare function isEmpty<A>(self: ReadonlyArray<A>): boolean;
|
|
15
15
|
/**
|
|
16
|
-
* @tsplus fluent fncts.
|
|
17
|
-
* @tsplus fluent fncts.
|
|
16
|
+
* @tsplus fluent fncts.Array isNonEmpty
|
|
17
|
+
* @tsplus fluent fncts.ReadonlyArray isNonEmpty
|
|
18
18
|
* @tsplus location "@fncts/base/collection/compat/Array/api"
|
|
19
19
|
*/
|
|
20
20
|
export declare function isNonEmpty<A>(self: ReadonlyArray<A>): self is ReadonlyNonEmptyArray<A>;
|
|
21
21
|
/**
|
|
22
|
-
* @tsplus fluent fncts.
|
|
23
|
-
* @tsplus fluent fncts.
|
|
22
|
+
* @tsplus fluent fncts.Array foldLeft
|
|
23
|
+
* @tsplus fluent fncts.ReadonlyArray foldLeft
|
|
24
24
|
* @tsplus location "@fncts/base/collection/compat/Array/api"
|
|
25
25
|
*/
|
|
26
26
|
export declare function foldLeft<A, B>(self: ReadonlyArray<A>, b: B, f: (b: B, a: A) => B): B;
|
|
27
27
|
/**
|
|
28
|
-
* @tsplus fluent fncts.
|
|
29
|
-
* @tsplus fluent fncts.
|
|
28
|
+
* @tsplus fluent fncts.Array foldLeftWithIndex
|
|
29
|
+
* @tsplus fluent fncts.ReadonlyArray foldLeftWithIndex
|
|
30
30
|
* @tsplus location "@fncts/base/collection/compat/Array/api"
|
|
31
31
|
*/
|
|
32
32
|
export declare function foldLeftWithIndex<A, B>(self: ReadonlyArray<A>, b: B, f: (i: number, b: B, a: A) => B): B;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
/**
|
|
3
|
-
* @tsplus type fncts.
|
|
3
|
+
* @tsplus type fncts.ReadonlyArray
|
|
4
4
|
*/
|
|
5
5
|
export interface ReadonlyArray<T> {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* @tsplus type fncts.
|
|
8
|
+
* @tsplus type fncts.Array
|
|
9
9
|
*/
|
|
10
10
|
export interface Array<T> {
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* @tsplus type fncts.
|
|
13
|
+
* @tsplus type fncts.ArrayOps
|
|
14
14
|
*/
|
|
15
15
|
export interface ArrayConstructor {
|
|
16
16
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Guard } from "@fncts/base/typeclass/Guard";
|
|
2
|
+
import { Decoder } from "@fncts/base/data/Decoder";
|
|
3
|
+
import { These } from "@fncts/base/data/These";
|
|
4
|
+
import type { Check } from "@fncts/typelevel/Check";
|
|
5
|
+
/**
|
|
6
|
+
* @tsplus derive fncts.Guard[fncts.Array]<_> 10
|
|
7
|
+
* @tsplus location "@fncts/base/collection/compat/Array/derivations"
|
|
8
|
+
*/
|
|
9
|
+
export declare function deriveGuard<A extends Array<any>>(...[element]: [A] extends [Array<infer _A>] ? Check<Check.IsEqual<A, Array<_A>>> extends Check.True ? [element: Guard<_A>] : never : never): Guard<A>;
|
|
10
|
+
/**
|
|
11
|
+
* @tsplus derive fncts.Guard[fncts.ReadonlyArray]<_> 10
|
|
12
|
+
* @tsplus location "@fncts/base/collection/compat/Array/derivations"
|
|
13
|
+
*/
|
|
14
|
+
export declare const deriveReadonlyArrayGuard: <A extends ReadonlyArray<any>>(...[element]: [A] extends [ReadonlyArray<infer _A>] ? Check<Check.IsEqual<A, ReadonlyArray<_A>>> extends Check.True ? [element: Guard<_A>] : never : never) => Guard<A>;
|
|
15
|
+
/**
|
|
16
|
+
* @tsplus derive fncts.Decoder[fncts.Array]<_> 10
|
|
17
|
+
* @tsplus location "@fncts/base/collection/compat/Array/derivations"
|
|
18
|
+
*/
|
|
19
|
+
export declare function deriveDecoder<A extends Array<any>>(...[element]: [A] extends [Array<infer _A>] ? Check<Check.IsEqual<A, Array<_A>>> extends Check.True ? [element: Decoder<_A>] : never : never): Decoder<A>;
|
|
20
|
+
/**
|
|
21
|
+
* @tsplus derive fncts.Decoder[fncts.ReadonlyArray]<_> 10
|
|
22
|
+
* @tsplus location "@fncts/base/collection/compat/Array/derivations"
|
|
23
|
+
*/
|
|
24
|
+
export declare function deriveReadonlyArrayDecoder<A extends ReadonlyArray<any>>(...[element]: [A] extends [ReadonlyArray<infer _A>] ? Check<Check.IsEqual<A, ReadonlyArray<_A>>> extends Check.True ? [element: Decoder<_A>] : never : never): Decoder<A>;
|
|
@@ -31,7 +31,7 @@ export interface ConcF extends HKT {
|
|
|
31
31
|
* @tsplus companion fncts.ConcOps
|
|
32
32
|
*/
|
|
33
33
|
export declare abstract class Conc<A> implements Iterable<A>, Hashable, Equatable {
|
|
34
|
-
|
|
34
|
+
_A: () => A;
|
|
35
35
|
readonly _typeId: ConcTypeId;
|
|
36
36
|
abstract readonly length: number;
|
|
37
37
|
abstract [Symbol.iterator](): Iterator<A>;
|
|
@@ -40,7 +40,7 @@ export declare abstract class Conc<A> implements Iterable<A>, Hashable, Equatabl
|
|
|
40
40
|
}
|
|
41
41
|
declare abstract class ConcImplementation<A> implements Iterable<A> {
|
|
42
42
|
readonly _typeId: ConcTypeId;
|
|
43
|
-
|
|
43
|
+
_A: () => A;
|
|
44
44
|
get [Symbol.hash](): number;
|
|
45
45
|
[Symbol.equals](that: unknown): boolean;
|
|
46
46
|
abstract readonly length: number;
|
|
@@ -83,10 +83,11 @@ export declare class Empty<A> extends ConcImplementation<A> {
|
|
|
83
83
|
arrayIterator(): Iterator<Array<A>>;
|
|
84
84
|
reverseArrayIterator(): Iterator<Array<A>>;
|
|
85
85
|
}
|
|
86
|
-
export declare const _Empty: Empty<
|
|
86
|
+
export declare const _Empty: Empty<never>;
|
|
87
87
|
export declare class Concat<A> extends ConcImplementation<A> {
|
|
88
88
|
readonly left: ConcImplementation<A>;
|
|
89
89
|
readonly right: ConcImplementation<A>;
|
|
90
|
+
_A: () => A;
|
|
90
91
|
readonly _tag = ConcTag.Concat;
|
|
91
92
|
length: number;
|
|
92
93
|
depth: number;
|
|
@@ -107,8 +108,8 @@ declare class AppendN<A> extends ConcImplementation<A> {
|
|
|
107
108
|
readonly _tag = ConcTag.AppendN;
|
|
108
109
|
length: number;
|
|
109
110
|
depth: number;
|
|
110
|
-
left: Empty<
|
|
111
|
-
right: Empty<
|
|
111
|
+
left: Empty<never>;
|
|
112
|
+
right: Empty<never>;
|
|
112
113
|
constructor(start: ConcImplementation<A>, buffer: Array<unknown> | Uint8Array, bufferUsed: number, binary: boolean);
|
|
113
114
|
[Symbol.iterator](): Iterator<A>;
|
|
114
115
|
append<A1>(a: A1): ConcImplementation<A | A1>;
|
|
@@ -123,8 +124,8 @@ declare class PrependN<A> extends ConcImplementation<A> {
|
|
|
123
124
|
readonly binary: boolean;
|
|
124
125
|
readonly _tag = ConcTag.PrependN;
|
|
125
126
|
length: number;
|
|
126
|
-
left: Empty<
|
|
127
|
-
right: Empty<
|
|
127
|
+
left: Empty<never>;
|
|
128
|
+
right: Empty<never>;
|
|
128
129
|
constructor(end: ConcImplementation<A>, buffer: Array<unknown> | Uint8Array, bufferUsed: number, binary: boolean);
|
|
129
130
|
[Symbol.iterator](): Iterator<A>;
|
|
130
131
|
prepend<A1>(a: A1): ConcImplementation<A | A1>;
|
|
@@ -137,8 +138,8 @@ export declare class Singleton<A> extends ConcImplementation<A> {
|
|
|
137
138
|
readonly _tag = ConcTag.Singleton;
|
|
138
139
|
length: number;
|
|
139
140
|
depth: number;
|
|
140
|
-
left: Empty<
|
|
141
|
-
right: Empty<
|
|
141
|
+
left: Empty<never>;
|
|
142
|
+
right: Empty<never>;
|
|
142
143
|
binary: boolean;
|
|
143
144
|
constructor(value: A);
|
|
144
145
|
get(n: number): A;
|
|
@@ -156,8 +157,8 @@ export declare class Slice<A> extends ConcImplementation<A> {
|
|
|
156
157
|
length: number;
|
|
157
158
|
binary: boolean;
|
|
158
159
|
depth: number;
|
|
159
|
-
left: Empty<
|
|
160
|
-
right: Empty<
|
|
160
|
+
left: Empty<never>;
|
|
161
|
+
right: Empty<never>;
|
|
161
162
|
constructor(conc: ConcImplementation<A>, offset: number, l: number);
|
|
162
163
|
get(n: number): A;
|
|
163
164
|
forEach<B>(startIndex: number, f: (i: number, a: A) => B): void;
|
|
@@ -168,8 +169,8 @@ export declare class Chunk<A> extends ConcImplementation<A> {
|
|
|
168
169
|
readonly _tag = ConcTag.Chunk;
|
|
169
170
|
length: number;
|
|
170
171
|
depth: number;
|
|
171
|
-
left: Empty<
|
|
172
|
-
right: Empty<
|
|
172
|
+
left: Empty<never>;
|
|
173
|
+
right: Empty<never>;
|
|
173
174
|
binary: boolean;
|
|
174
175
|
constructor(_array: ReadonlyArray<A>);
|
|
175
176
|
get(n: number): A;
|
|
@@ -184,8 +185,8 @@ export declare class ByteChunk<A> extends ConcImplementation<A> {
|
|
|
184
185
|
readonly _tag = ConcTag.ByteChunk;
|
|
185
186
|
length: number;
|
|
186
187
|
depth: number;
|
|
187
|
-
left: Empty<
|
|
188
|
-
right: Empty<
|
|
188
|
+
left: Empty<never>;
|
|
189
|
+
right: Empty<never>;
|
|
189
190
|
binary: boolean;
|
|
190
191
|
constructor(_array: Uint8Array);
|
|
191
192
|
get(n: number): A;
|
|
@@ -205,7 +206,7 @@ export declare function concrete<A>(_: Conc<A>): asserts _ is Empty<A> | Singlet
|
|
|
205
206
|
*/
|
|
206
207
|
export declare function fromArray<A>(array: ArrayLike<A>): ConcImplementation<A>;
|
|
207
208
|
/**
|
|
208
|
-
* @tsplus static fncts.ConcOps
|
|
209
|
+
* @tsplus static fncts.ConcOps is
|
|
209
210
|
* @tsplus location "@fncts/base/collection/immutable/Conc/definition"
|
|
210
211
|
*/
|
|
211
212
|
export declare function isConc<A>(u: Iterable<A>): u is Conc<A>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
|
2
|
+
import { Guard } from "@fncts/base/typeclass/Guard";
|
|
3
|
+
import { Decoder } from "@fncts/base/data/Decoder";
|
|
4
|
+
import type { Check } from "@fncts/typelevel/Check";
|
|
5
|
+
/**
|
|
6
|
+
* @tsplus derive fncts.Guard[fncts.Conc]<_> 10
|
|
7
|
+
* @tsplus location "@fncts/base/collection/immutable/Conc/derivations"
|
|
8
|
+
*/
|
|
9
|
+
export declare function deriveGuard<A extends Conc<any>>(...[elem]: [A] extends [Conc<infer _A>] ? [elem: Guard<_A>] : never): Guard<A>;
|
|
10
|
+
/**
|
|
11
|
+
* @tsplus derive fncts.Decoder[fncts.Conc]<_> 10
|
|
12
|
+
* @tsplus location "@fncts/base/collection/immutable/Conc/derivations"
|
|
13
|
+
*/
|
|
14
|
+
export declare function deriveDecoder<A extends Conc<any>>(...[array, elem]: [A] extends [Conc<infer _A>] ? Check<Check.IsEqual<A, Conc<_A>>> extends Check.True ? [array: Decoder<Array<_A>>, elem: Decoder<_A>] : never : never): Decoder<A>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Conc/api.js";
|
|
2
2
|
export * from "./Conc/constructors.js";
|
|
3
3
|
export * from "./Conc/definition.js";
|
|
4
|
+
export * from "./Conc/derivations.js";
|
|
4
5
|
export * from "./Conc/api/empty.js";
|
|
5
6
|
export * from "./Conc/api/makeBy.js";
|
|
6
7
|
export * from "./Conc/api/replicate.js";
|