@duplojs/lang 0.0.0 → 0.0.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array/at/default.d.ts +1 -1
- package/dist/array/chunk.d.ts +3 -2
- package/dist/array/concat.d.ts +1 -1
- package/dist/array/copyWithin.d.ts +1 -1
- package/dist/array/fill/all.d.ts +1 -1
- package/dist/array/fill/default.d.ts +3 -3
- package/dist/array/filter.d.ts +1 -1
- package/dist/array/findAndReplace.d.ts +1 -1
- package/dist/array/findAndSplice/delete.d.ts +1 -1
- package/dist/array/findAndSplice/insert.d.ts +1 -1
- package/dist/array/index.cjs +0 -3
- package/dist/array/index.d.ts +0 -1
- package/dist/array/index.mjs +1 -3
- package/dist/array/insert.d.ts +3 -3
- package/dist/array/length.d.ts +1 -1
- package/dist/array/lengthEqual.d.ts +1 -1
- package/dist/array/map.d.ts +1 -1
- package/dist/array/maxElements.d.ts +1 -1
- package/dist/array/minElements.d.ts +1 -1
- package/dist/array/pop.d.ts +1 -1
- package/dist/array/prepend.d.ts +1 -1
- package/dist/array/push.d.ts +3 -3
- package/dist/array/reverse.d.ts +1 -1
- package/dist/array/shift.d.ts +1 -1
- package/dist/array/sort.d.ts +1 -1
- package/dist/array/splice/delete.d.ts +1 -1
- package/dist/array/splice/insert.d.ts +1 -1
- package/dist/array/unshift.d.ts +3 -3
- package/dist/chrono/createDate.cjs +9 -9
- package/dist/chrono/createDate.d.ts +3 -3
- package/dist/chrono/createDate.mjs +9 -9
- package/dist/chrono/createTime.cjs +24 -13
- package/dist/chrono/createTime.mjs +24 -13
- package/dist/chrono/theDate.cjs +15 -16
- package/dist/chrono/theDate.d.ts +15 -15
- package/dist/chrono/theDate.mjs +15 -16
- package/dist/chrono/theTime.cjs +0 -1
- package/dist/chrono/theTime.mjs +0 -1
- package/dist/chrono/types/spoolingTime.d.ts +2 -1
- package/dist/common/constraint/cast/index.d.ts +3 -3
- package/dist/common/constraint/cast/number.d.ts +15 -0
- package/dist/common/constraint/cast/string.d.ts +21 -0
- package/dist/common/constraint/index.d.ts +2 -0
- package/dist/common/constraint/infer/array.d.ts +7 -0
- package/dist/{array/infer.cjs → common/constraint/infer/index.cjs} +1 -1
- package/dist/common/constraint/infer/index.d.ts +26 -0
- package/dist/{string/infer.mjs → common/constraint/infer/index.mjs} +1 -1
- package/dist/common/constraint/infer/number.d.ts +11 -0
- package/dist/common/constraint/infer/string.d.ts +13 -0
- package/dist/common/constraint/remove.cjs +6 -0
- package/dist/common/constraint/remove.d.ts +2 -0
- package/dist/common/constraint/remove.mjs +6 -0
- package/dist/common/formData.cjs +4 -2
- package/dist/common/formData.mjs +4 -2
- package/dist/common/index.cjs +6 -0
- package/dist/common/index.mjs +5 -1
- package/dist/common/isType.d.ts +3 -2
- package/dist/common/queue.cjs +9 -7
- package/dist/common/queue.mjs +9 -7
- package/dist/common/types/forward.d.ts +1 -0
- package/dist/common/types/index.d.ts +3 -0
- package/dist/common/types/isObject.d.ts +8 -0
- package/dist/common/types/json.d.ts +1 -1
- package/dist/common/types/splitPromise.d.ts +1 -0
- package/dist/dataStructure/common/codec/base.cjs +29 -0
- package/dist/dataStructure/common/{codec.d.ts → codec/base.d.ts} +8 -8
- package/dist/dataStructure/common/codec/base.mjs +26 -0
- package/dist/dataStructure/common/codec/defaults/index.d.ts +2 -0
- package/dist/dataStructure/common/codec/defaults/json.cjs +26 -0
- package/dist/dataStructure/common/codec/defaults/json.d.ts +6 -0
- package/dist/dataStructure/common/codec/defaults/json.mjs +26 -0
- package/dist/dataStructure/common/codec/defaults/string.cjs +44 -0
- package/dist/dataStructure/common/codec/defaults/string.d.ts +11 -0
- package/dist/dataStructure/common/codec/defaults/string.mjs +44 -0
- package/dist/dataStructure/common/codec/index.d.ts +2 -0
- package/dist/dataStructure/common/error/base.cjs +73 -0
- package/dist/dataStructure/common/error/base.d.ts +50 -0
- package/dist/dataStructure/common/error/base.mjs +69 -0
- package/dist/dataStructure/common/error/defaultInterpreter.cjs +84 -0
- package/dist/dataStructure/common/error/defaultInterpreter.d.ts +57 -0
- package/dist/dataStructure/common/error/defaultInterpreter.mjs +83 -0
- package/dist/dataStructure/common/error/index.d.ts +3 -0
- package/dist/dataStructure/common/error/interpreter.cjs +45 -0
- package/dist/dataStructure/common/error/interpreter.d.ts +36 -0
- package/dist/dataStructure/common/error/interpreter.mjs +45 -0
- package/dist/dataStructure/constraint/base.cjs +34 -5
- package/dist/dataStructure/constraint/base.d.ts +13 -4
- package/dist/dataStructure/constraint/base.mjs +34 -6
- package/dist/dataStructure/constraint/defaults/absolutePath.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/absolutePath.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/absolutePath.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/allowedCharacters.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/allowedCharacters.d.ts +1 -3
- package/dist/dataStructure/constraint/defaults/allowedCharacters.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/arrayLengthEqual.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/arrayLengthEqual.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/arrayLengthEqual.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThan.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThan.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThan.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThanOrEqual.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThanOrEqual.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/betweenThanOrEqual.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/email.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/email.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/email.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/even.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/even.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/even.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThan.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThan.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThan.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThanOrEqual.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThanOrEqual.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/greaterThanOrEqual.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/index.d.ts +6 -0
- package/dist/dataStructure/constraint/defaults/integer.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/integer.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/integer.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/lessThan.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/lessThan.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/lessThan.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/lessThanOrEqual.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/lessThanOrEqual.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/lessThanOrEqual.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/maxCharacters.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/maxCharacters.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/maxCharacters.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/maxElements.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/maxElements.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/maxElements.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/minCharacters.cjs +4 -4
- package/dist/dataStructure/constraint/defaults/minCharacters.d.ts +2 -2
- package/dist/dataStructure/constraint/defaults/minCharacters.mjs +4 -4
- package/dist/dataStructure/constraint/defaults/minElements.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/minElements.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/minElements.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/multipleOf.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/multipleOf.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/multipleOf.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/negative.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/negative.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/negative.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/notEmpty.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/notEmpty.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/notEmpty.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/notZero.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/notZero.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/notZero.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/numberInString.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/numberInString.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/numberInString.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/odd.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/odd.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/odd.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/path.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/path.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/path.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/positive.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/positive.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/positive.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/refine.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/refine.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/refine.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/regex.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/regex.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/regex.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/safe.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/safe.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/safe.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/segmentPath.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/segmentPath.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/segmentPath.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/strictNegative.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/strictNegative.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/strictNegative.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/strictPositive.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/strictPositive.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/strictPositive.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/stringLengthEqual.cjs +1 -1
- package/dist/dataStructure/constraint/defaults/stringLengthEqual.d.ts +1 -1
- package/dist/dataStructure/constraint/defaults/stringLengthEqual.mjs +1 -1
- package/dist/dataStructure/constraint/defaults/trimmed.cjs +13 -0
- package/dist/dataStructure/constraint/defaults/trimmed.d.ts +10 -0
- package/dist/dataStructure/constraint/defaults/trimmed.mjs +12 -0
- package/dist/dataStructure/constraint/defaults/url.cjs +2 -2
- package/dist/dataStructure/constraint/defaults/url.d.ts +2 -3
- package/dist/dataStructure/constraint/defaults/url.mjs +2 -2
- package/dist/dataStructure/constraint/defaults/uuid.cjs +2 -4
- package/dist/dataStructure/constraint/defaults/uuid.d.ts +1 -3
- package/dist/dataStructure/constraint/defaults/uuid.mjs +4 -5
- package/dist/dataStructure/constraint/identifier.d.ts +3 -4
- package/dist/dataStructure/constraint/types/constraints.d.ts +22 -15
- package/dist/dataStructure/fundamentalType/base.cjs +3 -3
- package/dist/dataStructure/fundamentalType/base.d.ts +4 -5
- package/dist/dataStructure/fundamentalType/base.mjs +3 -3
- package/dist/dataStructure/fundamentalType/defaults/bigint.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/bigint.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/bigint.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/boolean.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/boolean.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/boolean.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/date.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/date.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/date.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/null.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/null.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/null.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/number.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/number.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/number.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/string.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/string.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/string.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/time.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/time.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/time.mjs +5 -2
- package/dist/dataStructure/fundamentalType/defaults/undefined.cjs +4 -2
- package/dist/dataStructure/fundamentalType/defaults/undefined.d.ts +4 -4
- package/dist/dataStructure/fundamentalType/defaults/undefined.mjs +5 -2
- package/dist/dataStructure/fundamentalType/identifier.d.ts +3 -4
- package/dist/dataStructure/helpers/absolutePath.cjs +7 -0
- package/dist/dataStructure/helpers/absolutePath.d.ts +2 -0
- package/dist/dataStructure/helpers/absolutePath.mjs +7 -0
- package/dist/dataStructure/helpers/array.d.ts +1 -1
- package/dist/dataStructure/helpers/bigint.d.ts +1 -1
- package/dist/dataStructure/helpers/boolean.d.ts +1 -1
- package/dist/dataStructure/helpers/date.d.ts +1 -1
- package/dist/dataStructure/helpers/extend.d.ts +1 -1
- package/dist/dataStructure/helpers/index.d.ts +10 -1
- package/dist/dataStructure/helpers/isNullable.cjs +12 -0
- package/dist/dataStructure/helpers/isNullable.d.ts +2 -0
- package/dist/dataStructure/helpers/isNullable.mjs +12 -0
- package/dist/dataStructure/helpers/isOptional.cjs +12 -0
- package/dist/dataStructure/helpers/isOptional.d.ts +2 -0
- package/dist/dataStructure/helpers/isOptional.mjs +12 -0
- package/dist/dataStructure/helpers/lazy.d.ts +1 -1
- package/dist/dataStructure/helpers/null.d.ts +1 -1
- package/dist/dataStructure/helpers/nullable.cjs +5 -2
- package/dist/dataStructure/helpers/nullable.mjs +5 -2
- package/dist/dataStructure/helpers/number.d.ts +1 -1
- package/dist/dataStructure/helpers/numberInString.cjs +7 -0
- package/dist/dataStructure/helpers/numberInString.d.ts +2 -0
- package/dist/dataStructure/helpers/numberInString.mjs +7 -0
- package/dist/dataStructure/helpers/object.d.ts +1 -1
- package/dist/dataStructure/helpers/optional.cjs +5 -2
- package/dist/dataStructure/helpers/optional.mjs +5 -2
- package/dist/dataStructure/helpers/partial.cjs +5 -2
- package/dist/dataStructure/helpers/partial.mjs +5 -2
- package/dist/dataStructure/helpers/path.cjs +7 -0
- package/dist/dataStructure/helpers/path.d.ts +2 -0
- package/dist/dataStructure/helpers/path.mjs +7 -0
- package/dist/dataStructure/helpers/record.d.ts +1 -1
- package/dist/dataStructure/helpers/regex.cjs +7 -0
- package/dist/dataStructure/helpers/regex.d.ts +2 -0
- package/dist/dataStructure/helpers/regex.mjs +7 -0
- package/dist/dataStructure/helpers/required.cjs +6 -3
- package/dist/dataStructure/helpers/required.d.ts +2 -1
- package/dist/dataStructure/helpers/required.mjs +6 -3
- package/dist/dataStructure/helpers/segmentPath.cjs +7 -0
- package/dist/dataStructure/helpers/segmentPath.d.ts +2 -0
- package/dist/dataStructure/helpers/segmentPath.mjs +7 -0
- package/dist/dataStructure/helpers/string.d.ts +1 -1
- package/dist/dataStructure/helpers/time.d.ts +1 -1
- package/dist/dataStructure/helpers/trimmed.cjs +7 -0
- package/dist/dataStructure/helpers/trimmed.d.ts +2 -0
- package/dist/dataStructure/helpers/trimmed.mjs +7 -0
- package/dist/dataStructure/helpers/undefined.d.ts +1 -1
- package/dist/dataStructure/helpers/union.d.ts +1 -1
- package/dist/dataStructure/helpers/unwrapLazy.cjs +9 -0
- package/dist/dataStructure/helpers/unwrapLazy.d.ts +2 -0
- package/dist/dataStructure/helpers/unwrapLazy.mjs +9 -0
- package/dist/dataStructure/helpers/url.cjs +2 -2
- package/dist/dataStructure/helpers/url.d.ts +1 -2
- package/dist/dataStructure/helpers/url.mjs +2 -2
- package/dist/dataStructure/index.cjs +158 -60
- package/dist/dataStructure/index.mjs +80 -21
- package/dist/dataStructure/structure/base.cjs +22 -12
- package/dist/dataStructure/structure/base.d.ts +8 -5
- package/dist/dataStructure/structure/base.mjs +16 -6
- package/dist/dataStructure/structure/defaults/array.d.ts +2 -2
- package/dist/dataStructure/structure/defaults/array.mjs +8 -5
- package/dist/dataStructure/structure/defaults/index.d.ts +1 -0
- package/dist/dataStructure/structure/defaults/lazy.cjs +10 -3
- package/dist/dataStructure/structure/defaults/lazy.d.ts +2 -2
- package/dist/dataStructure/structure/defaults/lazy.mjs +10 -3
- package/dist/dataStructure/structure/defaults/nonEncodableString.cjs +17 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.d.ts +10 -0
- package/dist/dataStructure/structure/defaults/nonEncodableString.mjs +16 -0
- package/dist/dataStructure/structure/defaults/object.d.ts +2 -2
- package/dist/dataStructure/structure/defaults/object.mjs +8 -5
- package/dist/dataStructure/structure/defaults/record.cjs +7 -7
- package/dist/dataStructure/structure/defaults/record.d.ts +3 -3
- package/dist/dataStructure/structure/defaults/record.mjs +15 -12
- package/dist/dataStructure/structure/defaults/type.cjs +1 -1
- package/dist/dataStructure/structure/defaults/type.d.ts +2 -2
- package/dist/dataStructure/structure/defaults/type.mjs +2 -2
- package/dist/dataStructure/structure/defaults/union.cjs +23 -17
- package/dist/dataStructure/structure/defaults/union.d.ts +3 -3
- package/dist/dataStructure/structure/defaults/union.mjs +27 -18
- package/dist/dataStructure/structure/identifier.d.ts +3 -4
- package/dist/dataStructure/structure/types/constraintsValue.d.ts +1 -1
- package/dist/dataStructure/structure/types/structures.d.ts +2 -1
- package/dist/dataStructure/structure/types/value.d.ts +1 -1
- package/dist/dataStructure/type/base.cjs +17 -4
- package/dist/dataStructure/type/base.d.ts +7 -3
- package/dist/dataStructure/type/base.mjs +17 -4
- package/dist/dataStructure/type/defaults/bigint.d.ts +1 -1
- package/dist/dataStructure/type/defaults/bigintLiteral.cjs +1 -1
- package/dist/dataStructure/type/defaults/bigintLiteral.d.ts +1 -1
- package/dist/dataStructure/type/defaults/bigintLiteral.mjs +1 -1
- package/dist/dataStructure/type/defaults/boolean.d.ts +1 -1
- package/dist/dataStructure/type/defaults/booleanLiteral.cjs +1 -1
- package/dist/dataStructure/type/defaults/booleanLiteral.d.ts +1 -1
- package/dist/dataStructure/type/defaults/booleanLiteral.mjs +1 -1
- package/dist/dataStructure/type/defaults/date.d.ts +1 -1
- package/dist/dataStructure/type/defaults/null.d.ts +1 -1
- package/dist/dataStructure/type/defaults/number.d.ts +1 -1
- package/dist/dataStructure/type/defaults/numberLiteral.cjs +1 -1
- package/dist/dataStructure/type/defaults/numberLiteral.d.ts +1 -1
- package/dist/dataStructure/type/defaults/numberLiteral.mjs +1 -1
- package/dist/dataStructure/type/defaults/string.d.ts +1 -1
- package/dist/dataStructure/type/defaults/stringLiteral.cjs +1 -1
- package/dist/dataStructure/type/defaults/stringLiteral.d.ts +1 -1
- package/dist/dataStructure/type/defaults/stringLiteral.mjs +1 -1
- package/dist/dataStructure/type/defaults/time.d.ts +1 -1
- package/dist/dataStructure/type/defaults/undefined.d.ts +1 -1
- package/dist/dataStructure/type/identifier.d.ts +3 -4
- package/dist/either/index.cjs +30 -8
- package/dist/either/index.d.ts +4 -0
- package/dist/either/index.mjs +23 -9
- package/dist/either/left/index.d.ts +3 -2
- package/dist/either/left/none.cjs +15 -0
- package/dist/either/left/none.d.ts +7 -0
- package/dist/either/left/none.mjs +14 -0
- package/dist/either/matchInformationOtherwise.d.ts +1 -1
- package/dist/either/rewriteInformation.cjs +22 -0
- package/dist/either/rewriteInformation.d.ts +14 -0
- package/dist/either/rewriteInformation.mjs +22 -0
- package/dist/either/right/asyncGroup.cjs +2 -2
- package/dist/either/right/asyncGroup.mjs +2 -2
- package/dist/either/right/group.cjs +1 -1
- package/dist/either/right/group.mjs +1 -1
- package/dist/either/right/index.d.ts +6 -5
- package/dist/either/right/some.cjs +15 -0
- package/dist/either/right/some.d.ts +7 -0
- package/dist/either/right/some.mjs +14 -0
- package/dist/either/toMaybe.cjs +12 -0
- package/dist/either/toMaybe.d.ts +5 -0
- package/dist/either/toMaybe.mjs +12 -0
- package/dist/either/types/mayBe.d.ts +3 -0
- package/dist/either/unwrapOr.cjs +14 -0
- package/dist/either/unwrapOr.d.ts +8 -0
- package/dist/either/unwrapOr.mjs +14 -0
- package/dist/either/unwrapOtherwise.cjs +14 -0
- package/dist/either/unwrapOtherwise.d.ts +8 -0
- package/dist/either/unwrapOtherwise.mjs +14 -0
- package/dist/generator/asyncChunk.d.ts +3 -2
- package/dist/generator/chunk.d.ts +3 -2
- package/dist/generator/reduce.cjs +2 -1
- package/dist/generator/reduce.mjs +1 -1
- package/dist/generator/types/flat.d.ts +2 -2
- package/dist/index.cjs +43 -39
- package/dist/index.mjs +4 -2
- package/dist/invocation/flow/base.d.ts +8 -3
- package/dist/invocation/flow/controller/base.d.ts +1 -0
- package/dist/invocation/flow/controller/defaults/aborter.cjs +38 -0
- package/dist/invocation/flow/controller/defaults/aborter.d.ts +17 -0
- package/dist/invocation/flow/controller/defaults/aborter.mjs +36 -0
- package/dist/invocation/flow/controller/defaults/debounce.d.ts +1 -1
- package/dist/invocation/flow/controller/defaults/filter.cjs +5 -3
- package/dist/invocation/flow/controller/defaults/filter.d.ts +1 -1
- package/dist/invocation/flow/controller/defaults/filter.mjs +5 -3
- package/dist/invocation/flow/controller/defaults/index.d.ts +1 -0
- package/dist/invocation/flow/controller/defaults/retry.d.ts +1 -1
- package/dist/invocation/flow/controller/defaults/throttling.d.ts +1 -1
- package/dist/invocation/flow/controller/defaults/timeout.d.ts +1 -1
- package/dist/invocation/index.cjs +15 -8
- package/dist/invocation/index.d.ts +1 -1
- package/dist/invocation/index.mjs +10 -6
- package/dist/invocation/reader.cjs +26 -0
- package/dist/invocation/reader.d.ts +28 -0
- package/dist/invocation/reader.mjs +25 -0
- package/dist/kind/createIdentifier.d.ts +8 -4
- package/dist/kind/types/getName.d.ts +2 -0
- package/dist/kind/types/getNamespaceName.d.ts +3 -0
- package/dist/kind/types/index.d.ts +2 -0
- package/dist/kind/types/remove.d.ts +2 -2
- package/dist/modeling/entity/base.cjs +38 -11
- package/dist/modeling/entity/base.d.ts +25 -10
- package/dist/modeling/entity/base.mjs +32 -6
- package/dist/modeling/entity/helper.d.ts +1 -1
- package/dist/modeling/entity/index.d.ts +0 -1
- package/dist/modeling/entity/namespace.cjs +2 -2
- package/dist/modeling/entity/namespace.d.ts +1 -1
- package/dist/modeling/entity/namespace.mjs +3 -3
- package/dist/modeling/flag/base.cjs +1 -5
- package/dist/modeling/flag/base.d.ts +6 -7
- package/dist/modeling/flag/base.mjs +1 -5
- package/dist/modeling/index.cjs +45 -28
- package/dist/modeling/index.d.ts +1 -0
- package/dist/modeling/index.mjs +18 -9
- package/dist/modeling/newType/base.cjs +34 -13
- package/dist/modeling/newType/base.d.ts +9 -2
- package/dist/modeling/newType/base.mjs +26 -7
- package/dist/modeling/newType/helper.cjs +2 -2
- package/dist/modeling/newType/helper.d.ts +1 -1
- package/dist/modeling/newType/helper.mjs +2 -2
- package/dist/modeling/taggedObject/base.cjs +113 -0
- package/dist/modeling/taggedObject/base.d.ts +61 -0
- package/dist/modeling/taggedObject/base.mjs +110 -0
- package/dist/modeling/taggedObject/helper.cjs +34 -0
- package/dist/modeling/taggedObject/helper.d.ts +15 -0
- package/dist/modeling/taggedObject/helper.mjs +31 -0
- package/dist/modeling/taggedObject/index.d.ts +2 -0
- package/dist/number/betweenThan.d.ts +2 -2
- package/dist/number/betweenThanOrEqual.d.ts +2 -2
- package/dist/number/greaterThan.d.ts +1 -1
- package/dist/number/greaterThanOrEqual.d.ts +1 -1
- package/dist/number/index.cjs +0 -3
- package/dist/number/index.d.ts +0 -1
- package/dist/number/index.mjs +1 -3
- package/dist/number/lessThan.d.ts +1 -1
- package/dist/number/lessThanOrEqual.d.ts +1 -1
- package/dist/number/sort.d.ts +1 -1
- package/dist/number/types/isGreater.d.ts +5 -5
- package/dist/object/assign.d.ts +3 -3
- package/dist/object/types/assign.d.ts +2 -0
- package/dist/object/types/forbiddenUndefinedProps.d.ts +3 -0
- package/dist/object/types/index.d.ts +4 -2
- package/dist/object/types/override.d.ts +4 -0
- package/dist/object/types/split.d.ts +2 -2
- package/dist/path/computeRelative.cjs +5 -6
- package/dist/path/computeRelative.d.ts +1 -1
- package/dist/path/computeRelative.mjs +5 -6
- package/dist/path/constraints/absolute.d.ts +1 -1
- package/dist/path/constraints/index.d.ts +2 -1
- package/dist/path/constraints/segment.d.ts +3 -0
- package/dist/path/getBaseName.cjs +7 -7
- package/dist/path/getBaseName.d.ts +2 -2
- package/dist/path/getBaseName.mjs +7 -7
- package/dist/path/getExtensionName.cjs +9 -4
- package/dist/path/getExtensionName.d.ts +2 -2
- package/dist/path/getExtensionName.mjs +9 -4
- package/dist/path/getParentFolderPath.cjs +9 -4
- package/dist/path/getParentFolderPath.d.ts +1 -2
- package/dist/path/getParentFolderPath.mjs +9 -4
- package/dist/path/index.cjs +6 -3
- package/dist/path/index.d.ts +3 -2
- package/dist/path/index.mjs +5 -3
- package/dist/path/is.cjs +9 -4
- package/dist/path/is.d.ts +4 -2
- package/dist/path/is.mjs +9 -4
- package/dist/path/isAbsolute.cjs +3 -5
- package/dist/path/isAbsolute.d.ts +4 -2
- package/dist/path/isAbsolute.mjs +3 -5
- package/dist/path/isSegment.cjs +6 -0
- package/dist/path/isSegment.d.ts +4 -0
- package/dist/path/isSegment.mjs +6 -0
- package/dist/path/normalize.cjs +18 -0
- package/dist/path/normalize.d.ts +2 -0
- package/dist/path/normalize.mjs +18 -0
- package/dist/path/resolveFrom.cjs +4 -5
- package/dist/path/resolveFrom.d.ts +10 -2
- package/dist/path/resolveFrom.mjs +4 -5
- package/dist/path/resolveRelative.cjs +17 -20
- package/dist/path/resolveRelative.d.ts +9 -2
- package/dist/path/resolveRelative.mjs +17 -20
- package/dist/path/types/index.d.ts +6 -0
- package/dist/path/types/isLiteralAbsolutePath.d.ts +2 -0
- package/dist/path/types/isLiteralPath.d.ts +20 -0
- package/dist/path/types/isLiteralSegmentPath.d.ts +9 -0
- package/dist/path/types/requireLiteralAbsolutePath.d.ts +3 -0
- package/dist/path/types/requireLiteralPath.d.ts +3 -0
- package/dist/path/types/requireLiteralSegmentPath.d.ts +3 -0
- package/dist/pattern/index.cjs +12 -0
- package/dist/pattern/index.d.ts +4 -0
- package/dist/pattern/index.mjs +9 -1
- package/dist/pattern/matchWithEntity.cjs +12 -0
- package/dist/pattern/matchWithEntity.d.ts +12 -0
- package/dist/pattern/matchWithEntity.mjs +12 -0
- package/dist/pattern/matchWithEntityOtherwise.cjs +13 -0
- package/dist/pattern/matchWithEntityOtherwise.d.ts +14 -0
- package/dist/pattern/matchWithEntityOtherwise.mjs +13 -0
- package/dist/pattern/matchWithNumber.d.ts +4 -4
- package/dist/pattern/matchWithNumberOtherwise.cjs +2 -6
- package/dist/pattern/matchWithNumberOtherwise.d.ts +4 -4
- package/dist/pattern/matchWithNumberOtherwise.mjs +2 -6
- package/dist/pattern/matchWithString.d.ts +4 -4
- package/dist/pattern/matchWithStringOtherwise.cjs +2 -6
- package/dist/pattern/matchWithStringOtherwise.d.ts +5 -5
- package/dist/pattern/matchWithStringOtherwise.mjs +2 -6
- package/dist/pattern/matchWithTaggedObject.cjs +12 -0
- package/dist/pattern/matchWithTaggedObject.d.ts +12 -0
- package/dist/pattern/matchWithTaggedObject.mjs +12 -0
- package/dist/pattern/matchWithTaggedObjectOtherwise.cjs +13 -0
- package/dist/pattern/matchWithTaggedObjectOtherwise.d.ts +14 -0
- package/dist/pattern/matchWithTaggedObjectOtherwise.mjs +13 -0
- package/dist/string/at.d.ts +2 -2
- package/dist/string/constraints/allowedCharacters.d.ts +3 -3
- package/dist/string/constraints/index.d.ts +2 -1
- package/dist/string/constraints/number.d.ts +4 -0
- package/dist/string/first.d.ts +1 -1
- package/dist/string/index.cjs +6 -3
- package/dist/string/index.d.ts +1 -1
- package/dist/string/index.mjs +5 -3
- package/dist/string/isComposedOf.cjs +0 -1
- package/dist/string/isComposedOf.d.ts +5 -8
- package/dist/string/isComposedOf.mjs +0 -1
- package/dist/string/isNumber.cjs +7 -0
- package/dist/string/isNumber.d.ts +5 -0
- package/dist/string/isNumber.mjs +7 -0
- package/dist/string/isUrl.cjs +2 -11
- package/dist/string/isUrl.d.ts +1 -5
- package/dist/string/isUrl.mjs +2 -11
- package/dist/string/last.d.ts +1 -1
- package/dist/string/lengthEqual.d.ts +1 -1
- package/dist/string/maxCharacters.d.ts +1 -1
- package/dist/string/minCharacters.d.ts +1 -1
- package/dist/string/padEnd.d.ts +1 -1
- package/dist/string/padStart.d.ts +1 -1
- package/dist/string/pop.d.ts +1 -1
- package/dist/string/shift.d.ts +1 -1
- package/dist/string/slice.d.ts +1 -1
- package/dist/string/substring.d.ts +1 -1
- package/dist/string/to.d.ts +9 -2
- package/dist/string/trim/default.d.ts +1 -1
- package/dist/string/trim/end.d.ts +1 -1
- package/dist/string/trim/index.d.ts +1 -0
- package/dist/string/trim/is.cjs +6 -0
- package/dist/string/trim/is.d.ts +2 -0
- package/dist/string/trim/is.mjs +6 -0
- package/dist/string/trim/start.d.ts +1 -1
- package/dist/string/types/IsAllowedString.d.ts +5 -0
- package/dist/string/types/index.d.ts +5 -5
- package/dist/string/types/numberInString.d.ts +1 -0
- package/dist/string/types/split.d.ts +1 -1
- package/dist/tuple/from.cjs +6 -0
- package/dist/tuple/from.d.ts +8 -0
- package/dist/tuple/from.mjs +6 -0
- package/dist/tuple/index.cjs +6 -1
- package/dist/tuple/index.d.ts +1 -0
- package/dist/tuple/index.mjs +6 -2
- package/package.json +2 -2
- package/dist/array/infer.d.ts +0 -14
- package/dist/array/infer.mjs +0 -6
- package/dist/dataStructure/common/codec.cjs +0 -28
- package/dist/dataStructure/common/codec.mjs +0 -25
- package/dist/dataStructure/common/error.cjs +0 -53
- package/dist/dataStructure/common/error.d.ts +0 -30
- package/dist/dataStructure/common/error.mjs +0 -52
- package/dist/invocation/useCase.cjs +0 -26
- package/dist/invocation/useCase.d.ts +0 -28
- package/dist/invocation/useCase.mjs +0 -25
- package/dist/modeling/entity/entityName.cjs +0 -13
- package/dist/modeling/entity/entityName.d.ts +0 -13
- package/dist/modeling/entity/entityName.mjs +0 -13
- package/dist/number/infer.cjs +0 -6
- package/dist/number/infer.d.ts +0 -12
- package/dist/number/infer.mjs +0 -6
- package/dist/object/types/assignObjects.d.ts +0 -2
- package/dist/path/fix.cjs +0 -8
- package/dist/path/fix.d.ts +0 -1
- package/dist/path/fix.mjs +0 -8
- package/dist/string/infer.cjs +0 -6
- package/dist/string/infer.d.ts +0 -12
- package/dist/string/types/number.d.ts +0 -1
|
@@ -2,4 +2,4 @@ import { structureKind, Structure } from '../base';
|
|
|
2
2
|
import { StructureConstraintsValue } from './constraintsValue';
|
|
3
3
|
import type * as DKind from '../../../kind';
|
|
4
4
|
export type StructureValue<GenericStructure extends Structure> = DKind.GetValue<typeof structureKind, GenericStructure>;
|
|
5
|
-
export type StructureInitialValue<GenericStructure extends Structure
|
|
5
|
+
export type StructureInitialValue<GenericStructure extends Structure, GenericStructureValue = StructureValue<GenericStructure>> = GenericStructureValue extends unknown ? GenericStructureValue extends (infer InferredInitialValue) & StructureConstraintsValue<GenericStructure["definition"]["constraints"][number]> ? InferredInitialValue : GenericStructureValue : never;
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
const require_callThen = require("../../common/callThen.cjs");
|
|
2
|
+
const require_simpleClone = require("../../common/simpleClone.cjs");
|
|
2
3
|
const require_kind = require("../kind.cjs");
|
|
3
4
|
const require_resultSymbol = require("../common/resultSymbol.cjs");
|
|
4
5
|
//#region scripts/dataStructure/type/base.ts
|
|
5
6
|
const typeKind = require_kind.createKind("type");
|
|
6
7
|
function createType(fundamentalType, kindHandler, createConstructor) {
|
|
7
|
-
|
|
8
|
+
const init = (definition, { executeCheck, isAsynchronous }) => {
|
|
8
9
|
const self = {
|
|
10
|
+
fundamentalType,
|
|
9
11
|
definition,
|
|
10
|
-
executeCheck: (data
|
|
12
|
+
executeCheck: (data) => require_callThen.callThen(self.fundamentalType.executeCheck(data), (result) => result === require_resultSymbol.ErrorSymbol ? require_resultSymbol.ErrorSymbol : executeCheck(self, data)),
|
|
11
13
|
isAsynchronous: () => isAsynchronous(self),
|
|
12
|
-
|
|
14
|
+
clone: () => init(require_simpleClone.simpleClone(definition), {
|
|
15
|
+
executeCheck,
|
|
16
|
+
isAsynchronous
|
|
17
|
+
}),
|
|
18
|
+
setMessage: (message) => {
|
|
19
|
+
self.definition.message = message;
|
|
20
|
+
return self;
|
|
21
|
+
},
|
|
22
|
+
addMessage: (message) => {
|
|
23
|
+
return self.clone().setMessage(message);
|
|
24
|
+
},
|
|
13
25
|
[typeKind.runTimeKey]: null,
|
|
14
26
|
[kindHandler.runTimeKey]: null
|
|
15
27
|
};
|
|
16
28
|
return self;
|
|
17
|
-
}
|
|
29
|
+
};
|
|
30
|
+
return createConstructor({ init });
|
|
18
31
|
}
|
|
19
32
|
//#endregion
|
|
20
33
|
exports.createType = createType;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { FundamentalType, FundamentalTypeValue } from '../fundamentalType';
|
|
2
|
-
import { ErrorSymbol,
|
|
2
|
+
import { ErrorSymbol, SuccessSymbol } from '../common';
|
|
3
3
|
import type * as DKind from '../../kind';
|
|
4
4
|
import * as DCommon from '../../common';
|
|
5
5
|
export declare const typeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/type", unknown>>;
|
|
6
6
|
export interface TypeDefinition {
|
|
7
|
+
readonly message?: string;
|
|
7
8
|
}
|
|
8
9
|
export interface Type<GenericFundamentalType extends FundamentalType = FundamentalType, GenericValue extends FundamentalTypeValue<GenericFundamentalType> = FundamentalTypeValue<GenericFundamentalType>, GenericDefinition extends TypeDefinition = TypeDefinition> extends DKind.Kind<typeof typeKind, GenericValue> {
|
|
9
10
|
readonly fundamentalType: GenericFundamentalType;
|
|
10
11
|
readonly definition: GenericDefinition;
|
|
11
|
-
executeCheck(data: unknown
|
|
12
|
+
executeCheck(data: unknown): DCommon.MaybePromise<SuccessSymbol | ErrorSymbol>;
|
|
12
13
|
isAsynchronous(): boolean;
|
|
14
|
+
clone(): this;
|
|
15
|
+
setMessage(massage: string): this;
|
|
16
|
+
addMessage(massage: string): this;
|
|
13
17
|
}
|
|
14
18
|
export interface CreateTypeInitParams<GenericType extends Type = Type, GenericFundamentalType extends FundamentalType = FundamentalType> {
|
|
15
|
-
executeCheck(self: GenericType, data: FundamentalTypeValue<GenericFundamentalType
|
|
19
|
+
executeCheck(self: GenericType, data: FundamentalTypeValue<GenericFundamentalType>): DCommon.MaybePromise<SuccessSymbol | ErrorSymbol>;
|
|
16
20
|
isAsynchronous(self: GenericType): boolean;
|
|
17
21
|
}
|
|
18
22
|
export interface CreateTypeConstructorParams<GenericFundamentalType extends FundamentalType = FundamentalType, GenericKindHandler extends DKind.Handler = DKind.Handler> {
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import { callThen } from "../../common/callThen.mjs";
|
|
2
|
+
import { simpleClone } from "../../common/simpleClone.mjs";
|
|
2
3
|
import { createKind } from "../kind.mjs";
|
|
3
4
|
import { ErrorSymbol } from "../common/resultSymbol.mjs";
|
|
4
5
|
//#region scripts/dataStructure/type/base.ts
|
|
5
6
|
const typeKind = createKind("type");
|
|
6
7
|
function createType(fundamentalType, kindHandler, createConstructor) {
|
|
7
|
-
|
|
8
|
+
const init = (definition, { executeCheck, isAsynchronous }) => {
|
|
8
9
|
const self = {
|
|
10
|
+
fundamentalType,
|
|
9
11
|
definition,
|
|
10
|
-
executeCheck: (data
|
|
12
|
+
executeCheck: (data) => callThen(self.fundamentalType.executeCheck(data), (result) => result === ErrorSymbol ? ErrorSymbol : executeCheck(self, data)),
|
|
11
13
|
isAsynchronous: () => isAsynchronous(self),
|
|
12
|
-
|
|
14
|
+
clone: () => init(simpleClone(definition), {
|
|
15
|
+
executeCheck,
|
|
16
|
+
isAsynchronous
|
|
17
|
+
}),
|
|
18
|
+
setMessage: (message) => {
|
|
19
|
+
self.definition.message = message;
|
|
20
|
+
return self;
|
|
21
|
+
},
|
|
22
|
+
addMessage: (message) => {
|
|
23
|
+
return self.clone().setMessage(message);
|
|
24
|
+
},
|
|
13
25
|
[typeKind.runTimeKey]: null,
|
|
14
26
|
[kindHandler.runTimeKey]: null
|
|
15
27
|
};
|
|
16
28
|
return self;
|
|
17
|
-
}
|
|
29
|
+
};
|
|
30
|
+
return createConstructor({ init });
|
|
18
31
|
}
|
|
19
32
|
//#endregion
|
|
20
33
|
export { createType, typeKind };
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const bigintTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/bigint-type", unknown>>;
|
|
6
6
|
export interface BigintTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface BigintType extends DCommon.
|
|
8
|
+
export interface BigintType extends DCommon.Forward<Type<FundamentalType.TheBigint, bigint, BigintTypeDefinition> & DKind.Kind<typeof bigintTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const BigintType: () => BigintType;
|
|
@@ -5,7 +5,7 @@ const require_base = require("../base.cjs");
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/bigintLiteral.ts
|
|
6
6
|
const bigintLiteralTypeKind = require_kind.createKind("bigint-literal-type");
|
|
7
7
|
const BigintLiteralType = require_base.createType(require_bigint.TheBigint, bigintLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? require_resultSymbol.SuccessSymbol : require_resultSymbol.ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ export declare const bigintLiteralTypeKind: DKind.Handler<DKind.Definition<"@Dup
|
|
|
6
6
|
export interface BigintLiteralTypeDefinition extends TypeDefinition {
|
|
7
7
|
value: bigint;
|
|
8
8
|
}
|
|
9
|
-
export interface BigintLiteralType<GenericValue extends bigint = bigint> extends DCommon.
|
|
9
|
+
export interface BigintLiteralType<GenericValue extends bigint = bigint> extends DCommon.Forward<Type<FundamentalType.TheBigint, GenericValue, BigintLiteralTypeDefinition> & DKind.Kind<typeof bigintLiteralTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const BigintLiteralType: <const GenericBigint extends bigint>(value: GenericBigint) => BigintLiteralType<GenericBigint>;
|
|
@@ -5,7 +5,7 @@ import { createType } from "../base.mjs";
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/bigintLiteral.ts
|
|
6
6
|
const bigintLiteralTypeKind = createKind("bigint-literal-type");
|
|
7
7
|
const BigintLiteralType = createType(TheBigint, bigintLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? SuccessSymbol : ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const booleanTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/boolean-type", unknown>>;
|
|
6
6
|
export interface BooleanTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface BooleanType extends DCommon.
|
|
8
|
+
export interface BooleanType extends DCommon.Forward<Type<FundamentalType.TheBoolean, boolean, BooleanTypeDefinition> & DKind.Kind<typeof booleanTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const BooleanType: () => BooleanType;
|
|
@@ -5,7 +5,7 @@ const require_base = require("../base.cjs");
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/booleanLiteral.ts
|
|
6
6
|
const booleanLiteralTypeKind = require_kind.createKind("boolean-literal-type");
|
|
7
7
|
const BooleanLiteralType = require_base.createType(require_boolean.TheBoolean, booleanLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? require_resultSymbol.SuccessSymbol : require_resultSymbol.ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ export declare const booleanLiteralTypeKind: DKind.Handler<DKind.Definition<"@Du
|
|
|
6
6
|
export interface BooleanLiteralTypeDefinition extends TypeDefinition {
|
|
7
7
|
value: boolean;
|
|
8
8
|
}
|
|
9
|
-
export interface BooleanLiteralType<GenericValue extends boolean = boolean> extends DCommon.
|
|
9
|
+
export interface BooleanLiteralType<GenericValue extends boolean = boolean> extends DCommon.Forward<Type<FundamentalType.TheBoolean, GenericValue, BooleanLiteralTypeDefinition> & DKind.Kind<typeof booleanLiteralTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const BooleanLiteralType: <const GenericBoolean extends boolean>(value: GenericBoolean) => BooleanLiteralType<GenericBoolean>;
|
|
@@ -5,7 +5,7 @@ import { createType } from "../base.mjs";
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/booleanLiteral.ts
|
|
6
6
|
const booleanLiteralTypeKind = createKind("boolean-literal-type");
|
|
7
7
|
const BooleanLiteralType = createType(TheBoolean, booleanLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? SuccessSymbol : ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
6
6
|
export declare const dateTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/date-type", unknown>>;
|
|
7
7
|
export interface DateTypeDefinition extends TypeDefinition {
|
|
8
8
|
}
|
|
9
|
-
export interface DateType extends DCommon.
|
|
9
|
+
export interface DateType extends DCommon.Forward<Type<FundamentalType.TheDate, DChrono.TheDate, DateTypeDefinition> & DKind.Kind<typeof dateTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const DateType: () => DateType;
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const nullTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/null-type", unknown>>;
|
|
6
6
|
export interface NullTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface NullType extends DCommon.
|
|
8
|
+
export interface NullType extends DCommon.Forward<Type<FundamentalType.TheNull, null, NullTypeDefinition> & DKind.Kind<typeof nullTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const NullType: () => NullType;
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const numberTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/number-type", unknown>>;
|
|
6
6
|
export interface NumberTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface NumberType extends DCommon.
|
|
8
|
+
export interface NumberType extends DCommon.Forward<Type<FundamentalType.TheNumber, number, NumberTypeDefinition> & DKind.Kind<typeof numberTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const NumberType: () => NumberType;
|
|
@@ -5,7 +5,7 @@ const require_base = require("../base.cjs");
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/numberLiteral.ts
|
|
6
6
|
const numberLiteralTypeKind = require_kind.createKind("number-literal-type");
|
|
7
7
|
const NumberLiteralType = require_base.createType(require_number.TheNumber, numberLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? require_resultSymbol.SuccessSymbol : require_resultSymbol.ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ export declare const numberLiteralTypeKind: DKind.Handler<DKind.Definition<"@Dup
|
|
|
6
6
|
export interface NumberLiteralTypeDefinition extends TypeDefinition {
|
|
7
7
|
value: number;
|
|
8
8
|
}
|
|
9
|
-
export interface NumberLiteralType<GenericValue extends number = number> extends DCommon.
|
|
9
|
+
export interface NumberLiteralType<GenericValue extends number = number> extends DCommon.Forward<Type<FundamentalType.TheNumber, GenericValue, NumberLiteralTypeDefinition> & DKind.Kind<typeof numberLiteralTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const NumberLiteralType: <const GenericNumber extends number>(value: GenericNumber) => NumberLiteralType<GenericNumber>;
|
|
@@ -5,7 +5,7 @@ import { createType } from "../base.mjs";
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/numberLiteral.ts
|
|
6
6
|
const numberLiteralTypeKind = createKind("number-literal-type");
|
|
7
7
|
const NumberLiteralType = createType(TheNumber, numberLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? SuccessSymbol : ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const stringTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/string-type", unknown>>;
|
|
6
6
|
export interface StringTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface StringType extends DCommon.
|
|
8
|
+
export interface StringType extends DCommon.Forward<Type<FundamentalType.TheString, string, StringTypeDefinition> & DKind.Kind<typeof stringTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const StringType: () => StringType;
|
|
@@ -5,7 +5,7 @@ const require_base = require("../base.cjs");
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/stringLiteral.ts
|
|
6
6
|
const stringLiteralTypeKind = require_kind.createKind("string-literal-type");
|
|
7
7
|
const StringLiteralType = require_base.createType(require_string.TheString, stringLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? require_resultSymbol.SuccessSymbol : require_resultSymbol.ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ export declare const stringLiteralTypeKind: DKind.Handler<DKind.Definition<"@Dup
|
|
|
6
6
|
export interface StringLiteralTypeDefinition extends TypeDefinition {
|
|
7
7
|
value: string;
|
|
8
8
|
}
|
|
9
|
-
export interface StringLiteralType<GenericValue extends string = string> extends DCommon.
|
|
9
|
+
export interface StringLiteralType<GenericValue extends string = string> extends DCommon.Forward<Type<FundamentalType.TheString, GenericValue, StringLiteralTypeDefinition> & DKind.Kind<typeof stringLiteralTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const StringLiteralType: <const GenericString extends string>(value: GenericString) => StringLiteralType<GenericString>;
|
|
@@ -5,7 +5,7 @@ import { createType } from "../base.mjs";
|
|
|
5
5
|
//#region scripts/dataStructure/type/defaults/stringLiteral.ts
|
|
6
6
|
const stringLiteralTypeKind = createKind("string-literal-type");
|
|
7
7
|
const StringLiteralType = createType(TheString, stringLiteralTypeKind, ({ init }) => (value) => init({ value }, {
|
|
8
|
-
executeCheck: (self, data
|
|
8
|
+
executeCheck: (self, data) => data === self.definition.value ? SuccessSymbol : ErrorSymbol,
|
|
9
9
|
isAsynchronous: () => false
|
|
10
10
|
}));
|
|
11
11
|
//#endregion
|
|
@@ -6,6 +6,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
6
6
|
export declare const timeTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/time-type", unknown>>;
|
|
7
7
|
export interface TimeTypeDefinition extends TypeDefinition {
|
|
8
8
|
}
|
|
9
|
-
export interface TimeType extends DCommon.
|
|
9
|
+
export interface TimeType extends DCommon.Forward<Type<FundamentalType.TheTime, DChrono.TheTime, TimeTypeDefinition> & DKind.Kind<typeof timeTypeKind>> {
|
|
10
10
|
}
|
|
11
11
|
export declare const TimeType: () => TimeType;
|
|
@@ -5,6 +5,6 @@ import * as FundamentalType from "../../fundamentalType";
|
|
|
5
5
|
export declare const undefinedTypeKind: DKind.Handler<DKind.Definition<"@DuplojsLangDataStructure/undefined-type", unknown>>;
|
|
6
6
|
export interface UndefinedTypeDefinition extends TypeDefinition {
|
|
7
7
|
}
|
|
8
|
-
export interface UndefinedType extends DCommon.
|
|
8
|
+
export interface UndefinedType extends DCommon.Forward<Type<FundamentalType.TheUndefined, undefined, UndefinedTypeDefinition> & DKind.Kind<typeof undefinedTypeKind>> {
|
|
9
9
|
}
|
|
10
10
|
export declare const UndefinedType: () => UndefinedType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Type } from './base';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
2
|
+
import { Types } from './types';
|
|
3
|
+
import * as DKind from '../../kind';
|
|
4
|
+
export declare const typeIdentifier: DKind.KindIdentifier<Type<import('..').FundamentalType<unknown>, unknown, import('..').TypeDefinition>, Types>;
|
package/dist/either/index.cjs
CHANGED
|
@@ -4,23 +4,25 @@ const require_create = require("./left/create.cjs");
|
|
|
4
4
|
const require_error = require("./left/error.cjs");
|
|
5
5
|
const require_fail = require("./left/fail.cjs");
|
|
6
6
|
const require_is = require("./left/is.cjs");
|
|
7
|
+
const require_create$1 = require("./right/create.cjs");
|
|
8
|
+
const require_none = require("./left/none.cjs");
|
|
9
|
+
const require_unwrap = require("./left/unwrap.cjs");
|
|
10
|
+
const require_unwrapOrThrow = require("./left/unwrapOrThrow.cjs");
|
|
7
11
|
const require_when = require("./left/when.cjs");
|
|
8
12
|
const require_whenOtherwise = require("./left/whenOtherwise.cjs");
|
|
9
|
-
const
|
|
10
|
-
const require_unwrap = require("./left/unwrap.cjs");
|
|
11
|
-
const require_create$1 = require("./right/create.cjs");
|
|
13
|
+
const require_asyncGroup = require("./right/asyncGroup.cjs");
|
|
12
14
|
const require_success = require("./right/success.cjs");
|
|
13
15
|
const require_is$1 = require("./right/is.cjs");
|
|
14
16
|
const require_asyncPipe = require("./right/asyncPipe.cjs");
|
|
17
|
+
const require_when$1 = require("./right/when.cjs");
|
|
18
|
+
const require_group = require("./right/group.cjs");
|
|
15
19
|
const require_ok = require("./right/ok.cjs");
|
|
16
20
|
const require_pipe = require("./right/pipe.cjs");
|
|
17
|
-
const require_when$1 = require("./right/when.cjs");
|
|
18
|
-
const require_whenOtherwise$1 = require("./right/whenOtherwise.cjs");
|
|
19
21
|
const require_result = require("./right/result.cjs");
|
|
20
|
-
const
|
|
22
|
+
const require_some = require("./right/some.cjs");
|
|
21
23
|
const require_unwrap$1 = require("./right/unwrap.cjs");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
+
const require_unwrapOrThrow$1 = require("./right/unwrapOrThrow.cjs");
|
|
25
|
+
const require_whenOtherwise$1 = require("./right/whenOtherwise.cjs");
|
|
24
26
|
const require_whenHasInformation = require("./whenHasInformation.cjs");
|
|
25
27
|
const require_whenHasInformationOtherwise = require("./whenHasInformationOtherwise.cjs");
|
|
26
28
|
const require_whenIsSelected = require("./whenIsSelected.cjs");
|
|
@@ -30,12 +32,16 @@ const require_asyncSafeCallback = require("./asyncSafeCallback.cjs");
|
|
|
30
32
|
const require_expect = require("./expect.cjs");
|
|
31
33
|
const require_matchInformation = require("./matchInformation.cjs");
|
|
32
34
|
const require_matchInformationOtherwise = require("./matchInformationOtherwise.cjs");
|
|
35
|
+
const require_rewriteInformation = require("./rewriteInformation.cjs");
|
|
36
|
+
const require_toMaybe = require("./toMaybe.cjs");
|
|
33
37
|
const require_unwrapSelection = require("./unwrapSelection.cjs");
|
|
34
38
|
const require_unwrapSelectionOrThrow = require("./unwrapSelectionOrThrow.cjs");
|
|
35
39
|
const require_forwardAssertsSelection = require("./forwardAssertsSelection.cjs");
|
|
36
40
|
const require_hasInformation = require("./hasInformation.cjs");
|
|
37
41
|
const require_unwrapByInformation = require("./unwrapByInformation.cjs");
|
|
38
42
|
const require_unwrapByInformationOrThrow = require("./unwrapByInformationOrThrow.cjs");
|
|
43
|
+
const require_unwrapOr = require("./unwrapOr.cjs");
|
|
44
|
+
const require_unwrapOtherwise = require("./unwrapOtherwise.cjs");
|
|
39
45
|
const require_keepAsRightByInformation = require("./keepAsRightByInformation.cjs");
|
|
40
46
|
const require_keepAsRightSelection = require("./keepAsRightSelection.cjs");
|
|
41
47
|
//#region scripts/either/index.ts
|
|
@@ -65,21 +71,29 @@ var either_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
65
71
|
leftKind: () => require_create.leftKind,
|
|
66
72
|
matchInformation: () => require_matchInformation.matchInformation,
|
|
67
73
|
matchInformationOtherwise: () => require_matchInformationOtherwise.matchInformationOtherwise,
|
|
74
|
+
none: () => require_none.none,
|
|
75
|
+
noneKind: () => require_none.noneKind,
|
|
68
76
|
ok: () => require_ok.ok,
|
|
69
77
|
okKind: () => require_ok.okKind,
|
|
70
78
|
result: () => require_result.result,
|
|
71
79
|
resultKind: () => require_result.resultKind,
|
|
80
|
+
rewriteInformation: () => require_rewriteInformation.rewriteInformation,
|
|
72
81
|
right: () => require_create$1.right,
|
|
73
82
|
rightAsyncPipe: () => require_asyncPipe.rightAsyncPipe,
|
|
74
83
|
rightKind: () => require_create$1.rightKind,
|
|
75
84
|
rightPipe: () => require_pipe.rightPipe,
|
|
76
85
|
safeCallback: () => require_safeCallback.safeCallback,
|
|
86
|
+
some: () => require_some.some,
|
|
87
|
+
someKind: () => require_some.someKind,
|
|
77
88
|
success: () => require_success.success,
|
|
78
89
|
successKind: () => require_success.successKind,
|
|
90
|
+
toMaybe: () => require_toMaybe.toMaybe,
|
|
79
91
|
unwrapByInformation: () => require_unwrapByInformation.unwrapByInformation,
|
|
80
92
|
unwrapByInformationOrThrow: () => require_unwrapByInformationOrThrow.unwrapByInformationOrThrow,
|
|
81
93
|
unwrapLeft: () => require_unwrap.unwrapLeft,
|
|
82
94
|
unwrapLeftOrThrow: () => require_unwrapOrThrow.unwrapLeftOrThrow,
|
|
95
|
+
unwrapOr: () => require_unwrapOr.unwrapOr,
|
|
96
|
+
unwrapOtherwise: () => require_unwrapOtherwise.unwrapOtherwise,
|
|
83
97
|
unwrapRight: () => require_unwrap$1.unwrapRight,
|
|
84
98
|
unwrapRightOrThrow: () => require_unwrapOrThrow$1.unwrapRightOrThrow,
|
|
85
99
|
unwrapSelection: () => require_unwrapSelection.unwrapSelection,
|
|
@@ -126,21 +140,29 @@ exports.left = require_create.left;
|
|
|
126
140
|
exports.leftKind = require_create.leftKind;
|
|
127
141
|
exports.matchInformation = require_matchInformation.matchInformation;
|
|
128
142
|
exports.matchInformationOtherwise = require_matchInformationOtherwise.matchInformationOtherwise;
|
|
143
|
+
exports.none = require_none.none;
|
|
144
|
+
exports.noneKind = require_none.noneKind;
|
|
129
145
|
exports.ok = require_ok.ok;
|
|
130
146
|
exports.okKind = require_ok.okKind;
|
|
131
147
|
exports.result = require_result.result;
|
|
132
148
|
exports.resultKind = require_result.resultKind;
|
|
149
|
+
exports.rewriteInformation = require_rewriteInformation.rewriteInformation;
|
|
133
150
|
exports.right = require_create$1.right;
|
|
134
151
|
exports.rightAsyncPipe = require_asyncPipe.rightAsyncPipe;
|
|
135
152
|
exports.rightKind = require_create$1.rightKind;
|
|
136
153
|
exports.rightPipe = require_pipe.rightPipe;
|
|
137
154
|
exports.safeCallback = require_safeCallback.safeCallback;
|
|
155
|
+
exports.some = require_some.some;
|
|
156
|
+
exports.someKind = require_some.someKind;
|
|
138
157
|
exports.success = require_success.success;
|
|
139
158
|
exports.successKind = require_success.successKind;
|
|
159
|
+
exports.toMaybe = require_toMaybe.toMaybe;
|
|
140
160
|
exports.unwrapByInformation = require_unwrapByInformation.unwrapByInformation;
|
|
141
161
|
exports.unwrapByInformationOrThrow = require_unwrapByInformationOrThrow.unwrapByInformationOrThrow;
|
|
142
162
|
exports.unwrapLeft = require_unwrap.unwrapLeft;
|
|
143
163
|
exports.unwrapLeftOrThrow = require_unwrapOrThrow.unwrapLeftOrThrow;
|
|
164
|
+
exports.unwrapOr = require_unwrapOr.unwrapOr;
|
|
165
|
+
exports.unwrapOtherwise = require_unwrapOtherwise.unwrapOtherwise;
|
|
144
166
|
exports.unwrapRight = require_unwrap$1.unwrapRight;
|
|
145
167
|
exports.unwrapRightOrThrow = require_unwrapOrThrow$1.unwrapRightOrThrow;
|
|
146
168
|
exports.unwrapSelection = require_unwrapSelection.unwrapSelection;
|
package/dist/either/index.d.ts
CHANGED
|
@@ -11,11 +11,15 @@ export * from './asyncSafeCallback';
|
|
|
11
11
|
export * from './expect';
|
|
12
12
|
export * from './matchInformation';
|
|
13
13
|
export * from './matchInformationOtherwise';
|
|
14
|
+
export * from './rewriteInformation';
|
|
15
|
+
export * from './toMaybe';
|
|
14
16
|
export * from './unwrapSelection';
|
|
15
17
|
export * from './unwrapSelectionOrThrow';
|
|
16
18
|
export * from './forwardAssertsSelection';
|
|
17
19
|
export * from './hasInformation';
|
|
18
20
|
export * from './unwrapByInformation';
|
|
19
21
|
export * from './unwrapByInformationOrThrow';
|
|
22
|
+
export * from './unwrapOr';
|
|
23
|
+
export * from './unwrapOtherwise';
|
|
20
24
|
export * from './keepAsRightByInformation';
|
|
21
25
|
export * from './keepAsRightSelection';
|
package/dist/either/index.mjs
CHANGED
|
@@ -4,23 +4,25 @@ import { left, leftKind } from "./left/create.mjs";
|
|
|
4
4
|
import { error, errorKind } from "./left/error.mjs";
|
|
5
5
|
import { fail, failKind } from "./left/fail.mjs";
|
|
6
6
|
import { isLeft } from "./left/is.mjs";
|
|
7
|
+
import { right, rightKind } from "./right/create.mjs";
|
|
8
|
+
import { none, noneKind } from "./left/none.mjs";
|
|
9
|
+
import { unwrapLeft } from "./left/unwrap.mjs";
|
|
10
|
+
import { NotLeftError, unwrapLeftOrThrow } from "./left/unwrapOrThrow.mjs";
|
|
7
11
|
import { whenIsLeft } from "./left/when.mjs";
|
|
8
12
|
import { whenIsLeftOtherwise } from "./left/whenOtherwise.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import { unwrapLeft } from "./left/unwrap.mjs";
|
|
11
|
-
import { right, rightKind } from "./right/create.mjs";
|
|
13
|
+
import { asyncGroup } from "./right/asyncGroup.mjs";
|
|
12
14
|
import { success, successKind } from "./right/success.mjs";
|
|
13
15
|
import { isRight } from "./right/is.mjs";
|
|
14
16
|
import { rightAsyncPipe } from "./right/asyncPipe.mjs";
|
|
17
|
+
import { whenIsRight } from "./right/when.mjs";
|
|
18
|
+
import { group } from "./right/group.mjs";
|
|
15
19
|
import { ok, okKind } from "./right/ok.mjs";
|
|
16
20
|
import { rightPipe } from "./right/pipe.mjs";
|
|
17
|
-
import { whenIsRight } from "./right/when.mjs";
|
|
18
|
-
import { whenIsRightOtherwise } from "./right/whenOtherwise.mjs";
|
|
19
21
|
import { result, resultKind } from "./right/result.mjs";
|
|
20
|
-
import {
|
|
22
|
+
import { some, someKind } from "./right/some.mjs";
|
|
21
23
|
import { unwrapRight } from "./right/unwrap.mjs";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
+
import { NotRightError, unwrapRightOrThrow } from "./right/unwrapOrThrow.mjs";
|
|
25
|
+
import { whenIsRightOtherwise } from "./right/whenOtherwise.mjs";
|
|
24
26
|
import { whenHasInformation } from "./whenHasInformation.mjs";
|
|
25
27
|
import { whenHasInformationOtherwise } from "./whenHasInformationOtherwise.mjs";
|
|
26
28
|
import { whenIsSelected } from "./whenIsSelected.mjs";
|
|
@@ -30,12 +32,16 @@ import { asyncSafeCallback } from "./asyncSafeCallback.mjs";
|
|
|
30
32
|
import { expect } from "./expect.mjs";
|
|
31
33
|
import { matchInformation } from "./matchInformation.mjs";
|
|
32
34
|
import { matchInformationOtherwise } from "./matchInformationOtherwise.mjs";
|
|
35
|
+
import { rewriteInformation } from "./rewriteInformation.mjs";
|
|
36
|
+
import { toMaybe } from "./toMaybe.mjs";
|
|
33
37
|
import { unwrapSelection } from "./unwrapSelection.mjs";
|
|
34
38
|
import { HasNotSelectedInformationError, unwrapSelectionOrThrow } from "./unwrapSelectionOrThrow.mjs";
|
|
35
39
|
import { ForwardAssertsSelectionError, forwardAssertsSelection } from "./forwardAssertsSelection.mjs";
|
|
36
40
|
import { hasInformation } from "./hasInformation.mjs";
|
|
37
41
|
import { unwrapByInformation } from "./unwrapByInformation.mjs";
|
|
38
42
|
import { HasNotInformationError, unwrapByInformationOrThrow } from "./unwrapByInformationOrThrow.mjs";
|
|
43
|
+
import { unwrapOr } from "./unwrapOr.mjs";
|
|
44
|
+
import { unwrapOtherwise } from "./unwrapOtherwise.mjs";
|
|
39
45
|
import { keepAsRightByInformation } from "./keepAsRightByInformation.mjs";
|
|
40
46
|
import { keepAsRightSelection } from "./keepAsRightSelection.mjs";
|
|
41
47
|
//#region scripts/either/index.ts
|
|
@@ -65,21 +71,29 @@ var either_exports = /* @__PURE__ */ __exportAll({
|
|
|
65
71
|
leftKind: () => leftKind,
|
|
66
72
|
matchInformation: () => matchInformation,
|
|
67
73
|
matchInformationOtherwise: () => matchInformationOtherwise,
|
|
74
|
+
none: () => none,
|
|
75
|
+
noneKind: () => noneKind,
|
|
68
76
|
ok: () => ok,
|
|
69
77
|
okKind: () => okKind,
|
|
70
78
|
result: () => result,
|
|
71
79
|
resultKind: () => resultKind,
|
|
80
|
+
rewriteInformation: () => rewriteInformation,
|
|
72
81
|
right: () => right,
|
|
73
82
|
rightAsyncPipe: () => rightAsyncPipe,
|
|
74
83
|
rightKind: () => rightKind,
|
|
75
84
|
rightPipe: () => rightPipe,
|
|
76
85
|
safeCallback: () => safeCallback,
|
|
86
|
+
some: () => some,
|
|
87
|
+
someKind: () => someKind,
|
|
77
88
|
success: () => success,
|
|
78
89
|
successKind: () => successKind,
|
|
90
|
+
toMaybe: () => toMaybe,
|
|
79
91
|
unwrapByInformation: () => unwrapByInformation,
|
|
80
92
|
unwrapByInformationOrThrow: () => unwrapByInformationOrThrow,
|
|
81
93
|
unwrapLeft: () => unwrapLeft,
|
|
82
94
|
unwrapLeftOrThrow: () => unwrapLeftOrThrow,
|
|
95
|
+
unwrapOr: () => unwrapOr,
|
|
96
|
+
unwrapOtherwise: () => unwrapOtherwise,
|
|
83
97
|
unwrapRight: () => unwrapRight,
|
|
84
98
|
unwrapRightOrThrow: () => unwrapRightOrThrow,
|
|
85
99
|
unwrapSelection: () => unwrapSelection,
|
|
@@ -95,4 +109,4 @@ var either_exports = /* @__PURE__ */ __exportAll({
|
|
|
95
109
|
whenIsSelectedOtherwise: () => whenIsSelectedOtherwise
|
|
96
110
|
});
|
|
97
111
|
//#endregion
|
|
98
|
-
export { ForwardAssertsSelectionError, HasNotInformationError, HasNotSelectedInformationError, NotLeftError, NotRightError, asyncGroup, asyncSafeCallback, createKind, either_exports, error, errorKind, expect, fail, failKind, forwardAssertsSelection, group, hasInformation, informationKind, isLeft, isRight, keepAsRightByInformation, keepAsRightSelection, left, leftKind, matchInformation, matchInformationOtherwise, ok, okKind, result, resultKind, right, rightAsyncPipe, rightKind, rightPipe, safeCallback, success, successKind, unwrapByInformation, unwrapByInformationOrThrow, unwrapLeft, unwrapLeftOrThrow, unwrapRight, unwrapRightOrThrow, unwrapSelection, unwrapSelectionOrThrow, valueKind, whenHasInformation, whenHasInformationOtherwise, whenIsLeft, whenIsLeftOtherwise, whenIsRight, whenIsRightOtherwise, whenIsSelected, whenIsSelectedOtherwise };
|
|
112
|
+
export { ForwardAssertsSelectionError, HasNotInformationError, HasNotSelectedInformationError, NotLeftError, NotRightError, asyncGroup, asyncSafeCallback, createKind, either_exports, error, errorKind, expect, fail, failKind, forwardAssertsSelection, group, hasInformation, informationKind, isLeft, isRight, keepAsRightByInformation, keepAsRightSelection, left, leftKind, matchInformation, matchInformationOtherwise, none, noneKind, ok, okKind, result, resultKind, rewriteInformation, right, rightAsyncPipe, rightKind, rightPipe, safeCallback, some, someKind, success, successKind, toMaybe, unwrapByInformation, unwrapByInformationOrThrow, unwrapLeft, unwrapLeftOrThrow, unwrapOr, unwrapOtherwise, unwrapRight, unwrapRightOrThrow, unwrapSelection, unwrapSelectionOrThrow, valueKind, whenHasInformation, whenHasInformationOtherwise, whenIsLeft, whenIsLeftOtherwise, whenIsRight, whenIsRightOtherwise, whenIsSelected, whenIsSelectedOtherwise };
|
|
@@ -2,7 +2,8 @@ export * from './create';
|
|
|
2
2
|
export * from './error';
|
|
3
3
|
export * from './fail';
|
|
4
4
|
export * from './is';
|
|
5
|
+
export * from './none';
|
|
6
|
+
export * from './unwrap';
|
|
7
|
+
export * from './unwrapOrThrow';
|
|
5
8
|
export * from './when';
|
|
6
9
|
export * from './whenOtherwise';
|
|
7
|
-
export * from './unwrapOrThrow';
|
|
8
|
-
export * from './unwrap';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_kind = require("../kind.cjs");
|
|
2
|
+
const require_create = require("../right/create.cjs");
|
|
3
|
+
//#region scripts/either/left/none.ts
|
|
4
|
+
const noneKind = require_kind.createKind("none");
|
|
5
|
+
function none() {
|
|
6
|
+
return {
|
|
7
|
+
[require_create.rightKind.runTimeKey]: null,
|
|
8
|
+
[require_kind.informationKind.runTimeKey]: "none",
|
|
9
|
+
[require_kind.valueKind.runTimeKey]: null,
|
|
10
|
+
[noneKind.runTimeKey]: null
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.none = none;
|
|
15
|
+
exports.noneKind = noneKind;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Right } from '../right/create';
|
|
2
|
+
import type * as DKind from '../../kind';
|
|
3
|
+
import type * as DCommon from '../../common';
|
|
4
|
+
export declare const noneKind: DKind.Handler<DKind.Definition<"@DuplojsLangEither/none", unknown>>;
|
|
5
|
+
export interface None extends DCommon.Forward<DKind.Kind<typeof noneKind> & Right<"none", null>> {
|
|
6
|
+
}
|
|
7
|
+
export declare function none(): None;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createKind, informationKind, valueKind } from "../kind.mjs";
|
|
2
|
+
import { rightKind } from "../right/create.mjs";
|
|
3
|
+
//#region scripts/either/left/none.ts
|
|
4
|
+
const noneKind = createKind("none");
|
|
5
|
+
function none() {
|
|
6
|
+
return {
|
|
7
|
+
[rightKind.runTimeKey]: null,
|
|
8
|
+
[informationKind.runTimeKey]: "none",
|
|
9
|
+
[valueKind.runTimeKey]: null,
|
|
10
|
+
[noneKind.runTimeKey]: null
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { none, noneKind };
|