arktype 2.0.0-dev.4 → 2.0.0-dev.5
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/__tests__/array.test.ts +123 -215
- package/__tests__/badDefinitionType.test.ts +2 -2
- package/__tests__/bounds.test.ts +448 -349
- package/__tests__/config.test.ts +8 -6
- package/__tests__/cyclic.test.ts +1 -1
- package/__tests__/dateLiteral.test.ts +2 -2
- package/__tests__/discrimination.test.ts +1 -1
- package/__tests__/divisor.test.ts +23 -19
- package/__tests__/enclosed.test.ts +7 -2
- package/__tests__/errors.test.ts +115 -0
- package/__tests__/expressions.test.ts +14 -20
- package/__tests__/generic.test.ts +4 -5
- package/__tests__/group.test.ts +8 -3
- package/__tests__/instanceof.test.ts +7 -7
- package/__tests__/intersection.test.ts +62 -38
- package/__tests__/keyTraversal.test.ts +0 -2
- package/__tests__/keyof.test.ts +15 -13
- package/__tests__/keywords.test.ts +29 -25
- package/__tests__/literal.test.ts +26 -8
- package/__tests__/match.test.ts +28 -16
- package/__tests__/morph.test.ts +187 -172
- package/__tests__/narrow.test.ts +38 -39
- package/__tests__/objectLiteral.test.ts +106 -76
- package/__tests__/realWorld.test.ts +62 -0
- package/__tests__/schema.bench.ts +14 -0
- package/__tests__/schema.test.ts +60 -0
- package/__tests__/scope.bench.ts +1 -1
- package/__tests__/scope.test.ts +8 -6
- package/__tests__/submodule.test.ts +2 -2
- package/__tests__/traverse.test.ts +34 -31
- package/__tests__/typeMethods.test.ts +2 -3
- package/__tests__/typeReference.test.ts +3 -3
- package/__tests__/unenclosed.test.ts +9 -3
- package/__tests__/union.test.ts +127 -55
- package/__tests__/unit.test.ts +61 -0
- package/base.ts +520 -0
- package/config.ts +25 -0
- package/constraints/ast.ts +288 -0
- package/constraints/constraint.ts +91 -0
- package/constraints/predicate.ts +102 -0
- package/constraints/props/index.ts +93 -0
- package/constraints/props/prop.ts +146 -0
- package/constraints/props/props.ts +148 -0
- package/constraints/props/sequence.ts +473 -0
- package/constraints/props/shared.ts +5 -0
- package/constraints/refinements/after.ts +68 -0
- package/constraints/refinements/before.ts +75 -0
- package/constraints/refinements/divisor.ts +76 -0
- package/constraints/refinements/exactLength.ts +75 -0
- package/constraints/refinements/kinds.ts +31 -0
- package/constraints/refinements/max.ts +61 -0
- package/constraints/refinements/maxLength.ts +66 -0
- package/constraints/refinements/min.ts +54 -0
- package/constraints/refinements/minLength.ts +63 -0
- package/constraints/refinements/range.ts +181 -0
- package/constraints/refinements/regex.ts +59 -0
- package/{ark.ts → keywords/ark.ts} +40 -30
- package/keywords/internal.ts +29 -0
- package/keywords/jsObject.ts +39 -0
- package/keywords/parsing.ts +87 -0
- package/keywords/root.ts +9 -0
- package/keywords/tsGenerics.ts +28 -0
- package/keywords/tsPrimitive.ts +52 -0
- package/keywords/utils/creditCard.ts +37 -0
- package/keywords/utils/date.ts +112 -0
- package/keywords/validation.ts +115 -0
- package/kinds.ts +115 -0
- package/main.ts +7 -8
- package/match.ts +30 -34
- package/out/ark.d.ts +5 -1
- package/out/ark.d.ts.map +1 -1
- package/out/ark.js +4 -1
- package/out/ark.js.map +1 -1
- package/out/base.d.ts +129 -0
- package/out/base.d.ts.map +1 -0
- package/out/base.js +274 -0
- package/out/base.js.map +1 -0
- package/out/builtins/builtins.d.ts +19 -0
- package/out/builtins/builtins.d.ts.map +1 -0
- package/out/builtins/builtins.js +12 -0
- package/out/builtins/builtins.js.map +1 -0
- package/out/builtins/jsObjects.d.ts +19 -0
- package/out/builtins/jsObjects.d.ts.map +1 -0
- package/out/builtins/jsObjects.js +15 -0
- package/out/builtins/jsObjects.js.map +1 -0
- package/out/builtins/parsing.d.ts +16 -0
- package/out/builtins/parsing.d.ts.map +1 -0
- package/out/builtins/parsing.js +59 -0
- package/out/builtins/parsing.js.map +1 -0
- package/out/builtins/tsGenerics.d.ts +2 -0
- package/out/builtins/tsGenerics.d.ts.map +1 -0
- package/out/builtins/tsGenerics.js +26 -0
- package/out/builtins/tsGenerics.js.map +1 -0
- package/out/builtins/tsKeywords.d.ts +23 -0
- package/out/builtins/tsKeywords.d.ts.map +1 -0
- package/out/builtins/tsKeywords.js +20 -0
- package/out/builtins/tsKeywords.js.map +1 -0
- package/out/builtins/utils/creditCard.d.ts +3 -0
- package/out/builtins/utils/creditCard.d.ts.map +1 -0
- package/out/builtins/utils/creditCard.js +36 -0
- package/out/builtins/utils/creditCard.js.map +1 -0
- package/out/builtins/utils/date.d.ts +22 -0
- package/out/builtins/utils/date.d.ts.map +1 -0
- package/out/builtins/utils/date.js +53 -0
- package/out/builtins/utils/date.js.map +1 -0
- package/out/builtins/validation.d.ts +19 -0
- package/out/builtins/validation.d.ts.map +1 -0
- package/out/builtins/validation.js +70 -0
- package/out/builtins/validation.js.map +1 -0
- package/out/config.d.ts +6 -0
- package/out/config.d.ts.map +1 -0
- package/out/config.js +17 -0
- package/out/config.js.map +1 -0
- package/out/constraints/ast.d.ts +176 -0
- package/out/constraints/ast.d.ts.map +1 -0
- package/out/constraints/ast.js +2 -0
- package/out/constraints/ast.js.map +1 -0
- package/out/constraints/constraint.d.ts +70 -0
- package/out/constraints/constraint.d.ts.map +1 -0
- package/out/constraints/constraint.js +21 -0
- package/out/constraints/constraint.js.map +1 -0
- package/out/constraints/predicate.d.ts +46 -0
- package/out/constraints/predicate.d.ts.map +1 -0
- package/out/constraints/predicate.js +47 -0
- package/out/constraints/predicate.js.map +1 -0
- package/out/constraints/props/index.d.ts +36 -0
- package/out/constraints/props/index.d.ts.map +1 -0
- package/out/constraints/props/index.js +48 -0
- package/out/constraints/props/index.js.map +1 -0
- package/out/constraints/props/optional.d.ts +34 -0
- package/out/constraints/props/optional.d.ts.map +1 -0
- package/out/constraints/props/optional.js +55 -0
- package/out/constraints/props/optional.js.map +1 -0
- package/out/constraints/props/prop.d.ts +46 -0
- package/out/constraints/props/prop.d.ts.map +1 -0
- package/out/constraints/props/prop.js +104 -0
- package/out/constraints/props/prop.js.map +1 -0
- package/out/constraints/props/props.d.ts +34 -0
- package/out/constraints/props/props.d.ts.map +1 -0
- package/out/constraints/props/props.js +106 -0
- package/out/constraints/props/props.js.map +1 -0
- package/out/constraints/props/required.d.ts +43 -0
- package/out/constraints/props/required.d.ts.map +1 -0
- package/out/constraints/props/required.js +76 -0
- package/out/constraints/props/required.js.map +1 -0
- package/out/constraints/props/sequence.d.ts +64 -0
- package/out/constraints/props/sequence.d.ts.map +1 -0
- package/out/constraints/props/sequence.js +327 -0
- package/out/constraints/props/sequence.js.map +1 -0
- package/out/constraints/props/shared.d.ts +3 -0
- package/out/constraints/props/shared.d.ts.map +1 -0
- package/out/constraints/props/shared.js +4 -0
- package/out/constraints/props/shared.js.map +1 -0
- package/out/constraints/refinements/after.d.ts +25 -0
- package/out/constraints/refinements/after.d.ts.map +1 -0
- package/out/constraints/refinements/after.js +35 -0
- package/out/constraints/refinements/after.js.map +1 -0
- package/out/constraints/refinements/before.d.ts +25 -0
- package/out/constraints/refinements/before.d.ts.map +1 -0
- package/out/constraints/refinements/before.js +41 -0
- package/out/constraints/refinements/before.js.map +1 -0
- package/out/constraints/refinements/divisor.d.ts +42 -0
- package/out/constraints/refinements/divisor.d.ts.map +1 -0
- package/out/constraints/refinements/divisor.js +41 -0
- package/out/constraints/refinements/divisor.js.map +1 -0
- package/out/constraints/refinements/exactLength.d.ts +41 -0
- package/out/constraints/refinements/exactLength.d.ts.map +1 -0
- package/out/constraints/refinements/exactLength.js +44 -0
- package/out/constraints/refinements/exactLength.js.map +1 -0
- package/out/constraints/refinements/kinds.d.ts +29 -0
- package/out/constraints/refinements/kinds.d.ts.map +1 -0
- package/out/constraints/refinements/kinds.js +17 -0
- package/out/constraints/refinements/kinds.js.map +1 -0
- package/out/constraints/refinements/length.d.ts +42 -0
- package/out/constraints/refinements/length.d.ts.map +1 -0
- package/out/constraints/refinements/length.js +45 -0
- package/out/constraints/refinements/length.js.map +1 -0
- package/out/constraints/refinements/max.d.ts +24 -0
- package/out/constraints/refinements/max.d.ts.map +1 -0
- package/out/constraints/refinements/max.js +31 -0
- package/out/constraints/refinements/max.js.map +1 -0
- package/out/constraints/refinements/maxLength.d.ts +24 -0
- package/out/constraints/refinements/maxLength.d.ts.map +1 -0
- package/out/constraints/refinements/maxLength.js +34 -0
- package/out/constraints/refinements/maxLength.js.map +1 -0
- package/out/constraints/refinements/min.d.ts +24 -0
- package/out/constraints/refinements/min.d.ts.map +1 -0
- package/out/constraints/refinements/min.js +25 -0
- package/out/constraints/refinements/min.js.map +1 -0
- package/out/constraints/refinements/minLength.d.ts +24 -0
- package/out/constraints/refinements/minLength.d.ts.map +1 -0
- package/out/constraints/refinements/minLength.js +32 -0
- package/out/constraints/refinements/minLength.js.map +1 -0
- package/out/constraints/refinements/range.d.ts +90 -0
- package/out/constraints/refinements/range.d.ts.map +1 -0
- package/out/constraints/refinements/range.js +72 -0
- package/out/constraints/refinements/range.js.map +1 -0
- package/out/constraints/refinements/regex.d.ts +43 -0
- package/out/constraints/refinements/regex.d.ts.map +1 -0
- package/out/constraints/refinements/regex.js +36 -0
- package/out/constraints/refinements/regex.js.map +1 -0
- package/out/constraints/refinements/shared.d.ts +5 -0
- package/out/constraints/refinements/shared.d.ts.map +1 -0
- package/out/constraints/refinements/shared.js +10 -0
- package/out/constraints/refinements/shared.js.map +1 -0
- package/out/inference.d.ts +40 -0
- package/out/inference.d.ts.map +1 -0
- package/out/inference.js +73 -0
- package/out/inference.js.map +1 -0
- package/out/keywords/ark.d.ts +60 -0
- package/out/keywords/ark.d.ts.map +1 -0
- package/out/keywords/ark.js +29 -0
- package/out/keywords/ark.js.map +1 -0
- package/out/keywords/internal.d.ts +13 -0
- package/out/keywords/internal.d.ts.map +1 -0
- package/out/keywords/internal.js +10 -0
- package/out/keywords/internal.js.map +1 -0
- package/out/keywords/jsObject.d.ts +20 -0
- package/out/keywords/jsObject.d.ts.map +1 -0
- package/out/keywords/jsObject.js +15 -0
- package/out/keywords/jsObject.js.map +1 -0
- package/out/keywords/parsing.d.ts +17 -0
- package/out/keywords/parsing.d.ts.map +1 -0
- package/out/keywords/parsing.js +61 -0
- package/out/keywords/parsing.js.map +1 -0
- package/out/keywords/root.d.ts +7 -0
- package/out/keywords/root.d.ts.map +1 -0
- package/out/keywords/root.js +4 -0
- package/out/keywords/root.js.map +1 -0
- package/out/keywords/tsGenerics.d.ts +2 -0
- package/out/keywords/tsGenerics.d.ts.map +1 -0
- package/out/keywords/tsGenerics.js +26 -0
- package/out/keywords/tsGenerics.js.map +1 -0
- package/out/keywords/tsPrimitive.d.ts +24 -0
- package/out/keywords/tsPrimitive.d.ts.map +1 -0
- package/out/keywords/tsPrimitive.js +22 -0
- package/out/keywords/tsPrimitive.js.map +1 -0
- package/out/keywords/utils/creditCard.d.ts +8 -0
- package/out/keywords/utils/creditCard.d.ts.map +1 -0
- package/out/keywords/utils/creditCard.js +36 -0
- package/out/keywords/utils/creditCard.js.map +1 -0
- package/out/keywords/utils/date.d.ts +25 -0
- package/out/keywords/utils/date.d.ts.map +1 -0
- package/out/keywords/utils/date.js +53 -0
- package/out/keywords/utils/date.js.map +1 -0
- package/out/keywords/validation.d.ts +20 -0
- package/out/keywords/validation.d.ts.map +1 -0
- package/out/keywords/validation.js +76 -0
- package/out/keywords/validation.js.map +1 -0
- package/out/kinds.d.ts +72 -0
- package/out/kinds.d.ts.map +1 -0
- package/out/kinds.js +29 -0
- package/out/kinds.js.map +1 -0
- package/out/main.d.ts +5 -4
- package/out/main.d.ts.map +1 -1
- package/out/main.js +2 -3
- package/out/main.js.map +1 -1
- package/out/match.d.ts +17 -18
- package/out/match.d.ts.map +1 -1
- package/out/match.js +3 -4
- package/out/match.js.map +1 -1
- package/out/parse.d.ts +23 -0
- package/out/parse.d.ts.map +1 -0
- package/out/parse.js +148 -0
- package/out/parse.js.map +1 -0
- package/out/parser/definition.d.ts +8 -9
- package/out/parser/definition.d.ts.map +1 -1
- package/out/parser/definition.js +8 -9
- package/out/parser/definition.js.map +1 -1
- package/out/parser/objectLiteral.d.ts +44 -11
- package/out/parser/objectLiteral.d.ts.map +1 -1
- package/out/parser/objectLiteral.js +47 -35
- package/out/parser/objectLiteral.js.map +1 -1
- package/out/parser/semantic/bounds.d.ts +8 -6
- package/out/parser/semantic/bounds.d.ts.map +1 -1
- package/out/parser/semantic/bounds.js.map +1 -1
- package/out/parser/semantic/divisor.d.ts +4 -6
- package/out/parser/semantic/divisor.d.ts.map +1 -1
- package/out/parser/semantic/infer.d.ts +28 -0
- package/out/parser/semantic/infer.d.ts.map +1 -0
- package/out/parser/semantic/infer.js +2 -0
- package/out/parser/semantic/infer.js.map +1 -0
- package/out/parser/semantic/utils.d.ts +3 -6
- package/out/parser/semantic/utils.d.ts.map +1 -1
- package/out/parser/semantic/validate.d.ts +1 -1
- package/out/parser/semantic/validate.d.ts.map +1 -1
- package/out/parser/semantic/validate.js.map +1 -1
- package/out/parser/string/reduce/dynamic.d.ts +13 -11
- package/out/parser/string/reduce/dynamic.d.ts.map +1 -1
- package/out/parser/string/reduce/dynamic.js +15 -9
- package/out/parser/string/reduce/dynamic.js.map +1 -1
- package/out/parser/string/reduce/shared.d.ts +2 -3
- package/out/parser/string/reduce/shared.d.ts.map +1 -1
- package/out/parser/string/reduce/shared.js.map +1 -1
- package/out/parser/string/reduce/static.d.ts +20 -19
- package/out/parser/string/reduce/static.d.ts.map +1 -1
- package/out/parser/string/shift/operand/date.d.ts +3 -2
- package/out/parser/string/shift/operand/date.d.ts.map +1 -1
- package/out/parser/string/shift/operand/date.js.map +1 -1
- package/out/parser/string/shift/operand/enclosed.d.ts +1 -1
- package/out/parser/string/shift/operand/enclosed.d.ts.map +1 -1
- package/out/parser/string/shift/operand/enclosed.js +6 -4
- package/out/parser/string/shift/operand/enclosed.js.map +1 -1
- package/out/parser/string/shift/operand/genericArgs.d.ts +4 -4
- package/out/parser/string/shift/operand/genericArgs.d.ts.map +1 -1
- package/out/parser/string/shift/operand/genericArgs.js.map +1 -1
- package/out/parser/string/shift/operand/operand.d.ts +2 -2
- package/out/parser/string/shift/operand/operand.d.ts.map +1 -1
- package/out/parser/string/shift/operand/operand.js.map +1 -1
- package/out/parser/string/shift/operand/unenclosed.d.ts +5 -6
- package/out/parser/string/shift/operand/unenclosed.d.ts.map +1 -1
- package/out/parser/string/shift/operand/unenclosed.js +5 -5
- package/out/parser/string/shift/operand/unenclosed.js.map +1 -1
- package/out/parser/string/shift/operator/bounds.d.ts +17 -12
- package/out/parser/string/shift/operator/bounds.d.ts.map +1 -1
- package/out/parser/string/shift/operator/bounds.js +28 -25
- package/out/parser/string/shift/operator/bounds.js.map +1 -1
- package/out/parser/string/shift/operator/divisor.d.ts +1 -1
- package/out/parser/string/shift/operator/divisor.d.ts.map +1 -1
- package/out/parser/string/shift/operator/divisor.js.map +1 -1
- package/out/parser/string/shift/scanner.d.ts.map +1 -1
- package/out/parser/string/string.d.ts +3 -3
- package/out/parser/string/string.d.ts.map +1 -1
- package/out/parser/string/string.js.map +1 -1
- package/out/parser/tuple.d.ts +95 -33
- package/out/parser/tuple.d.ts.map +1 -1
- package/out/parser/tuple.js +45 -48
- package/out/parser/tuple.js.map +1 -1
- package/out/schema.d.ts +44 -0
- package/out/schema.d.ts.map +1 -0
- package/out/schema.js +73 -0
- package/out/schema.js.map +1 -0
- package/out/schemaScope.d.ts +110 -0
- package/out/schemaScope.d.ts.map +1 -0
- package/out/schemaScope.js +212 -0
- package/out/schemaScope.js.map +1 -0
- package/out/scope.d.ts +98 -26
- package/out/scope.d.ts.map +1 -1
- package/out/scope.js +185 -45
- package/out/scope.js.map +1 -1
- package/out/shared/compile.d.ts +22 -0
- package/out/shared/compile.d.ts.map +1 -0
- package/out/shared/compile.js +67 -0
- package/out/shared/compile.js.map +1 -0
- package/out/shared/context.d.ts +29 -0
- package/out/shared/context.d.ts.map +1 -0
- package/out/shared/context.js +48 -0
- package/out/shared/context.js.map +1 -0
- package/out/shared/declare.d.ts +53 -0
- package/out/shared/declare.d.ts.map +1 -0
- package/out/shared/declare.js +2 -0
- package/out/shared/declare.js.map +1 -0
- package/out/shared/disjoint.d.ts +79 -0
- package/out/shared/disjoint.d.ts.map +1 -0
- package/out/shared/disjoint.js +82 -0
- package/out/shared/disjoint.js.map +1 -0
- package/out/shared/errors.d.ts +59 -0
- package/out/shared/errors.d.ts.map +1 -0
- package/out/shared/errors.js +108 -0
- package/out/shared/errors.js.map +1 -0
- package/out/shared/implement.d.ts +170 -0
- package/out/shared/implement.d.ts.map +1 -0
- package/out/shared/implement.js +69 -0
- package/out/shared/implement.js.map +1 -0
- package/out/shared/inference.d.ts +6 -0
- package/out/shared/inference.d.ts.map +1 -0
- package/out/shared/inference.js +5 -0
- package/out/shared/inference.js.map +1 -0
- package/out/shared/intersections.d.ts +15 -0
- package/out/shared/intersections.d.ts.map +1 -0
- package/out/shared/intersections.js.map +1 -0
- package/out/shared/traversal.d.ts +44 -0
- package/out/shared/traversal.d.ts.map +1 -0
- package/out/shared/traversal.js +97 -0
- package/out/shared/traversal.js.map +1 -0
- package/out/shared/utils.d.ts +8 -0
- package/out/shared/utils.d.ts.map +1 -0
- package/out/shared/utils.js +10 -0
- package/out/shared/utils.js.map +1 -0
- package/out/type.d.ts +10 -38
- package/out/type.d.ts.map +1 -1
- package/out/type.js +20 -106
- package/out/type.js.map +1 -1
- package/out/types/basis.d.ts +24 -0
- package/out/types/basis.d.ts.map +1 -0
- package/out/types/basis.js +15 -0
- package/out/types/basis.js.map +1 -0
- package/out/types/discriminate.d.ts +20 -0
- package/out/types/discriminate.d.ts.map +1 -0
- package/out/types/discriminate.js +114 -0
- package/out/types/discriminate.js.map +1 -0
- package/out/types/domain.d.ts +40 -0
- package/out/types/domain.d.ts.map +1 -0
- package/out/types/domain.js +38 -0
- package/out/types/domain.js.map +1 -0
- package/out/types/intersection.d.ts +67 -0
- package/out/types/intersection.d.ts.map +1 -0
- package/out/types/intersection.js +350 -0
- package/out/types/intersection.js.map +1 -0
- package/out/types/morph.d.ts +79 -0
- package/out/types/morph.d.ts.map +1 -0
- package/out/types/morph.js +95 -0
- package/out/types/morph.js.map +1 -0
- package/out/types/proto.d.ts +42 -0
- package/out/types/proto.d.ts.map +1 -0
- package/out/types/proto.js +48 -0
- package/out/types/proto.js.map +1 -0
- package/out/types/type.d.ts +61 -0
- package/out/types/type.d.ts.map +1 -0
- package/out/types/type.js +111 -0
- package/out/types/type.js.map +1 -0
- package/out/types/union.d.ts +48 -0
- package/out/types/union.d.ts.map +1 -0
- package/out/types/union.js +337 -0
- package/out/types/union.js.map +1 -0
- package/out/types/unit.d.ts +40 -0
- package/out/types/unit.d.ts.map +1 -0
- package/out/types/unit.js +48 -0
- package/out/types/unit.js.map +1 -0
- package/out/util.d.ts +5 -2
- package/out/util.d.ts.map +1 -1
- package/out/util.js.map +1 -1
- package/package.json +6 -3
- package/parse.ts +221 -0
- package/parser/definition.ts +24 -23
- package/parser/objectLiteral.ts +128 -88
- package/parser/semantic/bounds.ts +18 -9
- package/parser/semantic/divisor.ts +12 -10
- package/parser/semantic/infer.ts +152 -0
- package/parser/semantic/utils.ts +5 -13
- package/parser/semantic/validate.ts +1 -2
- package/parser/string/reduce/dynamic.ts +42 -30
- package/parser/string/reduce/shared.ts +1 -3
- package/parser/string/reduce/static.ts +22 -22
- package/parser/string/shift/operand/date.ts +9 -5
- package/parser/string/shift/operand/enclosed.ts +11 -5
- package/parser/string/shift/operand/genericArgs.ts +6 -6
- package/parser/string/shift/operand/operand.ts +1 -2
- package/parser/string/shift/operand/unenclosed.ts +14 -20
- package/parser/string/shift/operator/bounds.ts +59 -54
- package/parser/string/shift/operator/divisor.ts +2 -2
- package/parser/string/shift/scanner.ts +10 -10
- package/parser/string/string.ts +4 -4
- package/parser/tuple.ts +224 -202
- package/schema.ts +263 -0
- package/scope.ts +358 -81
- package/shared/compile.ts +92 -0
- package/shared/declare.ts +75 -0
- package/shared/disjoint.ts +203 -0
- package/shared/errors.ts +204 -0
- package/shared/implement.ts +327 -0
- package/shared/inference.ts +9 -0
- package/shared/intersections.ts +53 -0
- package/shared/traversal.ts +146 -0
- package/shared/utils.ts +30 -0
- package/type.ts +23 -183
- package/types/basis.ts +62 -0
- package/types/discriminate.ts +168 -0
- package/types/domain.ts +79 -0
- package/types/intersection.ts +539 -0
- package/types/morph.ts +263 -0
- package/types/proto.ts +89 -0
- package/types/type.ts +319 -0
- package/types/union.ts +451 -0
- package/types/unit.ts +78 -0
- package/util.ts +5 -2
- package/__tests__/astUtils.test.ts +0 -17
- package/__tests__/jsdoc.test.ts +0 -64
- package/__tests__/nodeDefinitions.test.ts +0 -190
- package/out/arkConfig.d.ts +0 -2
- package/out/arkConfig.d.ts.map +0 -1
- package/out/arkConfig.js +0 -10
- package/out/arkConfig.js.map +0 -1
- package/out/parser/semantic/intersections.d.ts +0 -14
- package/out/parser/semantic/intersections.d.ts.map +0 -1
- package/out/parser/semantic/intersections.js.map +0 -1
- package/out/parser/semantic/semantic.d.ts +0 -32
- package/out/parser/semantic/semantic.d.ts.map +0 -1
- package/out/parser/semantic/semantic.js +0 -2
- package/out/parser/semantic/semantic.js.map +0 -1
- package/out/parser/shared.d.ts +0 -62
- package/out/parser/shared.d.ts.map +0 -1
- package/out/parser/shared.js +0 -56
- package/out/parser/shared.js.map +0 -1
- package/out/test.d.ts +0 -2
- package/out/test.d.ts.map +0 -1
- package/out/test.js +0 -7
- package/out/test.js.map +0 -1
- package/out/tsconfig.build.tsbuildinfo +0 -1
- package/parser/semantic/semantic.ts +0 -143
- package/parser/shared.ts +0 -170
- /package/out/{parser/semantic → shared}/intersections.js +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { BaseMeta, declareNode } from "../../shared/declare.js";
|
|
2
|
+
import type { TraverseAllows } from "../../shared/traversal.js";
|
|
3
|
+
import { BasePrimitiveConstraint } from "../constraint.js";
|
|
4
|
+
import type { LengthBoundableData } from "./range.js";
|
|
5
|
+
export interface ExactLengthInner extends BaseMeta {
|
|
6
|
+
readonly rule: number;
|
|
7
|
+
}
|
|
8
|
+
export type NormalizedExactLengthSchema = ExactLengthInner;
|
|
9
|
+
export type ExactLengthSchema = NormalizedExactLengthSchema | number;
|
|
10
|
+
export type ExactLengthDeclaration = declareNode<{
|
|
11
|
+
kind: "exactLength";
|
|
12
|
+
schema: ExactLengthSchema;
|
|
13
|
+
normalizedSchema: NormalizedExactLengthSchema;
|
|
14
|
+
inner: ExactLengthInner;
|
|
15
|
+
prerequisite: LengthBoundableData;
|
|
16
|
+
errorContext: ExactLengthInner;
|
|
17
|
+
}>;
|
|
18
|
+
export declare class ExactLengthNode extends BasePrimitiveConstraint<ExactLengthDeclaration> {
|
|
19
|
+
static implementation: import("../../shared/implement.js").nodeImplementationOf<{
|
|
20
|
+
reducibleTo: "exactLength";
|
|
21
|
+
intersectionIsOpen: false;
|
|
22
|
+
childKind: never;
|
|
23
|
+
kind: "exactLength";
|
|
24
|
+
schema: ExactLengthSchema;
|
|
25
|
+
normalizedSchema: ExactLengthInner;
|
|
26
|
+
inner: ExactLengthInner;
|
|
27
|
+
prerequisite: LengthBoundableData;
|
|
28
|
+
errorContext: ExactLengthInner & import("../../shared/declare.js").BaseErrorContext<"exactLength">;
|
|
29
|
+
}>;
|
|
30
|
+
traverseAllows: TraverseAllows<LengthBoundableData>;
|
|
31
|
+
readonly compiledCondition: string;
|
|
32
|
+
readonly compiledNegation: string;
|
|
33
|
+
readonly impliedBasis: import("../../main.js").Type<string | unknown[], import("../../keywords/internal.js").internalPrimitive.exports>;
|
|
34
|
+
readonly errorContext: {
|
|
35
|
+
code: "exactLength";
|
|
36
|
+
readonly rule: number;
|
|
37
|
+
readonly description?: string;
|
|
38
|
+
};
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=exactLength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exactLength.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/exactLength.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG,2BAA2B,GAAG,MAAM,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC;IAChD,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,iBAAiB,CAAA;IACzB,gBAAgB,EAAE,2BAA2B,CAAA;IAC7C,KAAK,EAAE,gBAAgB,CAAA;IACvB,YAAY,EAAE,mBAAmB,CAAA;IACjC,YAAY,EAAE,gBAAgB,CAAA;CAC9B,CAAC,CAAA;AAEF,qBAAa,eAAgB,SAAQ,uBAAuB,CAAC,sBAAsB,CAAC;IACnF,MAAM,CAAC,cAAc;;;;;;;;;;OAwCnB;IAEF,cAAc,EAAE,cAAc,CAAC,mBAAmB,CAAC,CACzB;IAE1B,QAAQ,CAAC,iBAAiB,SAAiC;IAC3D,QAAQ,CAAC,gBAAgB,SAAiC;IAC1D,QAAQ,CAAC,YAAY,mHAAkC;IACvD,QAAQ,CAAC,YAAY;;;;MAAsC;IAC3D,QAAQ,CAAC,UAAU,SAA6B;CAChD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Disjoint } from "../../shared/disjoint.js";
|
|
2
|
+
import { BasePrimitiveConstraint } from "../constraint.js";
|
|
3
|
+
export class ExactLengthNode extends BasePrimitiveConstraint {
|
|
4
|
+
static implementation = this.implement({
|
|
5
|
+
collapsibleKey: "rule",
|
|
6
|
+
keys: {
|
|
7
|
+
rule: {}
|
|
8
|
+
},
|
|
9
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
10
|
+
intersections: {
|
|
11
|
+
exactLength: (l, r) => new Disjoint({
|
|
12
|
+
"[length]": {
|
|
13
|
+
unit: {
|
|
14
|
+
l: l.$.node("unit", { unit: l.rule }),
|
|
15
|
+
r: r.$.node("unit", { unit: r.rule })
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
minLength: (exactLength, minLength) => (minLength.exclusive
|
|
20
|
+
? exactLength.rule > minLength.rule
|
|
21
|
+
: exactLength.rule >= minLength.rule)
|
|
22
|
+
? exactLength
|
|
23
|
+
: Disjoint.from("range", exactLength, minLength),
|
|
24
|
+
maxLength: (exactLength, maxLength) => (maxLength.exclusive
|
|
25
|
+
? exactLength.rule < maxLength.rule
|
|
26
|
+
: exactLength.rule <= maxLength.rule)
|
|
27
|
+
? exactLength
|
|
28
|
+
: Disjoint.from("range", exactLength, maxLength)
|
|
29
|
+
},
|
|
30
|
+
hasAssociatedError: true,
|
|
31
|
+
defaults: {
|
|
32
|
+
description(node) {
|
|
33
|
+
return `exactly length ${node.rule}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
traverseAllows = (data) => data.length === this.rule;
|
|
38
|
+
compiledCondition = `data.length === ${this.rule}`;
|
|
39
|
+
compiledNegation = `data.length !== ${this.rule}`;
|
|
40
|
+
impliedBasis = this.$.keywords.lengthBoundable;
|
|
41
|
+
errorContext = this.createErrorContext(this.inner);
|
|
42
|
+
expression = `{ length: ${this.rule} }`;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=exactLength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exactLength.js","sourceRoot":"","sources":["../../../constraints/refinements/exactLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,k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CACrC;gBACA,CAAC,CAAC,WAAW;gBACb,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC;SAClD;QACD,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE;YACT,WAAW,CAAC,IAAI;gBACf,OAAO,kBAAkB,IAAI,CAAC,IAAI,EAAE,CAAA;YACrC,CAAC;SACD;KACD,CAAC,CAAA;IAEF,cAAc,GAAwC,CAAC,IAAI,EAAE,EAAE,CAC9D,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAA;IAEjB,iBAAiB,GAAG,mBAAmB,IAAI,CAAC,IAAI,EAAE,CAAA;IAClD,gBAAgB,GAAG,mBAAmB,IAAI,CAAC,IAAI,EAAE,CAAA;IACjD,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAA;IAC9C,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClD,UAAU,GAAG,aAAa,IAAI,CAAC,IAAI,IAAI,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AfterNode, type AfterDeclaration } from "./after.js";
|
|
2
|
+
import { BeforeNode, type BeforeDeclaration } from "./before.js";
|
|
3
|
+
import { ExactLengthNode, type ExactLengthDeclaration } from "./exactLength.js";
|
|
4
|
+
import { MaxNode, type MaxDeclaration } from "./max.js";
|
|
5
|
+
import { MaxLengthNode, type MaxLengthDeclaration } from "./maxLength.js";
|
|
6
|
+
import { MinNode, type MinDeclaration } from "./min.js";
|
|
7
|
+
import { MinLengthNode, type MinLengthDeclaration } from "./minLength.js";
|
|
8
|
+
export interface BoundDeclarations {
|
|
9
|
+
min: MinDeclaration;
|
|
10
|
+
max: MaxDeclaration;
|
|
11
|
+
minLength: MinLengthDeclaration;
|
|
12
|
+
maxLength: MaxLengthDeclaration;
|
|
13
|
+
exactLength: ExactLengthDeclaration;
|
|
14
|
+
after: AfterDeclaration;
|
|
15
|
+
before: BeforeDeclaration;
|
|
16
|
+
}
|
|
17
|
+
export declare const BoundNodes: {
|
|
18
|
+
min: typeof MinNode;
|
|
19
|
+
max: typeof MaxNode;
|
|
20
|
+
minLength: typeof MinLengthNode;
|
|
21
|
+
maxLength: typeof MaxLengthNode;
|
|
22
|
+
exactLength: typeof ExactLengthNode;
|
|
23
|
+
after: typeof AfterNode;
|
|
24
|
+
before: typeof BeforeNode;
|
|
25
|
+
};
|
|
26
|
+
export type BoundNodesByKind = {
|
|
27
|
+
[k in keyof typeof BoundNodes]: InstanceType<(typeof BoundNodes)[k]>;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/kinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAEzE,MAAM,WAAW,iBAAiB;IACjC,GAAG,EAAE,cAAc,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,oBAAoB,CAAA;IAC/B,SAAS,EAAE,oBAAoB,CAAA;IAC/B,WAAW,EAAE,sBAAsB,CAAA;IACnC,KAAK,EAAE,gBAAgB,CAAA;IACvB,MAAM,EAAE,iBAAiB,CAAA;CACzB;AAED,eAAO,MAAM,UAAU;;;;;;;;CAQtB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;KAC7B,CAAC,IAAI,MAAM,OAAO,UAAU,GAAG,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AfterNode } from "./after.js";
|
|
2
|
+
import { BeforeNode } from "./before.js";
|
|
3
|
+
import { ExactLengthNode } from "./exactLength.js";
|
|
4
|
+
import { MaxNode } from "./max.js";
|
|
5
|
+
import { MaxLengthNode } from "./maxLength.js";
|
|
6
|
+
import { MinNode } from "./min.js";
|
|
7
|
+
import { MinLengthNode } from "./minLength.js";
|
|
8
|
+
export const BoundNodes = {
|
|
9
|
+
min: MinNode,
|
|
10
|
+
max: MaxNode,
|
|
11
|
+
minLength: MinLengthNode,
|
|
12
|
+
maxLength: MaxLengthNode,
|
|
13
|
+
exactLength: ExactLengthNode,
|
|
14
|
+
after: AfterNode,
|
|
15
|
+
before: BeforeNode
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinds.js","sourceRoot":"","sources":["../../../constraints/refinements/kinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,UAAU,EAA0B,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,eAAe,EAA+B,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAuB,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,EAA6B,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAuB,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,aAAa,EAA6B,MAAM,gBAAgB,CAAA;AAYzE,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,OAAO;IACZ,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,eAAe;IAC5B,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,UAAU;CAClB,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { declareNode } from "../../shared/declare.js";
|
|
2
|
+
import { BasePrimitiveConstraint, type PrimitiveConstraintInner } from "../constraint.js";
|
|
3
|
+
import type { LengthBoundableData } from "./range.js";
|
|
4
|
+
export interface LengthInner extends PrimitiveConstraintInner<number> {
|
|
5
|
+
}
|
|
6
|
+
export type length<n extends number> = {
|
|
7
|
+
"==": n;
|
|
8
|
+
};
|
|
9
|
+
export type NormalizedLengthSchema = LengthInner;
|
|
10
|
+
export type LengthSchema = NormalizedLengthSchema | number;
|
|
11
|
+
export type LengthDeclaration = declareNode<{
|
|
12
|
+
kind: "length";
|
|
13
|
+
schema: LengthSchema;
|
|
14
|
+
normalizedSchema: NormalizedLengthSchema;
|
|
15
|
+
inner: LengthInner;
|
|
16
|
+
prerequisite: LengthBoundableData;
|
|
17
|
+
errorContext: LengthInner;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class LengthNode extends BasePrimitiveConstraint<LengthDeclaration, typeof LengthNode> {
|
|
20
|
+
static implementation: import("../../shared/implement.js").nodeImplementationOf<{
|
|
21
|
+
intersectionIsOpen: false;
|
|
22
|
+
childKind: never;
|
|
23
|
+
reducibleTo: "length";
|
|
24
|
+
kind: "length";
|
|
25
|
+
schema: LengthSchema;
|
|
26
|
+
normalizedSchema: LengthInner;
|
|
27
|
+
inner: LengthInner;
|
|
28
|
+
prerequisite: LengthBoundableData;
|
|
29
|
+
errorContext: LengthInner & import("../../shared/declare.js").BaseErrorContext<"length">;
|
|
30
|
+
}>;
|
|
31
|
+
traverseAllows: (data: LengthBoundableData) => boolean;
|
|
32
|
+
readonly compiledCondition: string;
|
|
33
|
+
readonly compiledNegation: string;
|
|
34
|
+
readonly impliedBasis: import("../../types/union.js").UnionNode<LengthBoundableData>;
|
|
35
|
+
readonly errorContext: {
|
|
36
|
+
code: "length";
|
|
37
|
+
description: string;
|
|
38
|
+
readonly rule: number;
|
|
39
|
+
};
|
|
40
|
+
readonly expression: string;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=length.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/length.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,EACN,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,WAAW,WAAY,SAAQ,wBAAwB,CAAC,MAAM,CAAC;CAAG;AAExE,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,IAAI;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAA;AAElD,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAA;AAEhD,MAAM,MAAM,YAAY,GAAG,sBAAsB,GAAG,MAAM,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC;IAC3C,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;IACpB,gBAAgB,EAAE,sBAAsB,CAAA;IACxC,KAAK,EAAE,WAAW,CAAA;IAClB,YAAY,EAAE,mBAAmB,CAAA;IACjC,YAAY,EAAE,WAAW,CAAA;CACzB,CAAC,CAAA;AAEF,qBAAa,UAAW,SAAQ,uBAAuB,CACtD,iBAAiB,EACjB,OAAO,UAAU,CACjB;IACA,MAAM,CAAC,cAAc;;;;;;;;;;OAwCnB;IAEF,cAAc,SAAU,mBAAmB,aAA8B;IAEzE,QAAQ,CAAC,iBAAiB,SAAsC;IAChE,QAAQ,CAAC,gBAAgB,SAAsC;IAC/D,QAAQ,CAAC,YAAY,gEAAyB;IAC9C,QAAQ,CAAC,YAAY;;;;MAAsC;IAC3D,QAAQ,CAAC,UAAU,SAA4B;CAC/C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsData } from "../../shared/compile.js";
|
|
2
|
+
import { Disjoint } from "../../shared/disjoint.js";
|
|
3
|
+
import { BasePrimitiveConstraint } from "../constraint.js";
|
|
4
|
+
export class LengthNode extends BasePrimitiveConstraint {
|
|
5
|
+
static implementation = this.implement({
|
|
6
|
+
collapseKey: "rule",
|
|
7
|
+
keys: {
|
|
8
|
+
rule: {}
|
|
9
|
+
},
|
|
10
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
11
|
+
intersections: {
|
|
12
|
+
length: (l, r) => new Disjoint({
|
|
13
|
+
"[length]": {
|
|
14
|
+
unit: {
|
|
15
|
+
l: l.$.parse("unit", { unit: l.rule }),
|
|
16
|
+
r: r.$.parse("unit", { unit: r.rule })
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
minLength: (length, minLength) => (minLength.exclusive
|
|
21
|
+
? length.rule > minLength.rule
|
|
22
|
+
: length.rule >= minLength.rule)
|
|
23
|
+
? length
|
|
24
|
+
: Disjoint.from("range", length, minLength),
|
|
25
|
+
maxLength: (length, maxLength) => (maxLength.exclusive
|
|
26
|
+
? length.rule < maxLength.rule
|
|
27
|
+
: length.rule <= maxLength.rule)
|
|
28
|
+
? length
|
|
29
|
+
: Disjoint.from("range", length, maxLength)
|
|
30
|
+
},
|
|
31
|
+
hasAssociatedError: true,
|
|
32
|
+
defaults: {
|
|
33
|
+
description(node) {
|
|
34
|
+
return `exactly length ${node.rule}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
traverseAllows = (data) => data.length === this.rule;
|
|
39
|
+
compiledCondition = `${jsData}.length === ${this.rule}`;
|
|
40
|
+
compiledNegation = `${jsData}.length !== ${this.rule}`;
|
|
41
|
+
impliedBasis = this.$.lengthBoundable;
|
|
42
|
+
errorContext = this.createErrorContext(this.inner);
|
|
43
|
+
expression = `{ length: ${this.rule}}`;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=length.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.js","sourceRoot":"","sources":["../../../constraints/refinements/length.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EACN,uBAAuB,EAEvB,MAAM,kBAAkB,CAAA;AAoBzB,MAAM,OAAO,UAAW,SAAQ,uBAG/B;IACA,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC;QACtC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE;YACL,IAAI,EAAE,EAAE;SACR;QACD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACrB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;QACvD,aAAa,EAAE;YACd,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAChB,IAAI,QAAQ,CAAC;gBACZ,UAAU,EAAE;oBACX,IAAI,EAAE;wBACL,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;wBACtC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;qBACtC;iBACD;aACD,CAAC;YACH,SAAS,EAAE,CAAC,MAAM,EAA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../shared/declare.js";
|
|
2
|
+
import type { nodeImplementationOf } from "../../shared/implement.js";
|
|
3
|
+
import { BaseRange, type BaseNormalizedRangeSchema, type BaseRangeInner } from "./range.js";
|
|
4
|
+
export interface MaxInner extends BaseRangeInner {
|
|
5
|
+
rule: number;
|
|
6
|
+
}
|
|
7
|
+
export interface NormalizedMaxSchema extends BaseNormalizedRangeSchema {
|
|
8
|
+
rule: number;
|
|
9
|
+
}
|
|
10
|
+
export type MaxSchema = NormalizedMaxSchema | number;
|
|
11
|
+
export type MaxDeclaration = declareNode<{
|
|
12
|
+
kind: "max";
|
|
13
|
+
schema: MaxSchema;
|
|
14
|
+
normalizedSchema: NormalizedMaxSchema;
|
|
15
|
+
inner: MaxInner;
|
|
16
|
+
prerequisite: number;
|
|
17
|
+
errorContext: MaxInner;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class MaxNode extends BaseRange<MaxDeclaration> {
|
|
20
|
+
static implementation: nodeImplementationOf<MaxDeclaration>;
|
|
21
|
+
readonly impliedBasis: import("../../main.js").Type<number, import("../../keywords/tsPrimitive.js").tsPrimitive.exports>;
|
|
22
|
+
traverseAllows: (data: number) => boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=max.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/max.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EACN,SAAS,EAET,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC/C,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,mBAAoB,SAAQ,yBAAyB;IACrE,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEpD,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,SAAS,CAAA;IACjB,gBAAgB,EAAE,mBAAmB,CAAA;IACrC,KAAK,EAAE,QAAQ,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,QAAQ,CAAA;CACtB,CAAC,CAAA;AAEF,qBAAa,OAAQ,SAAQ,SAAS,CAAC,cAAc,CAAC;IACrD,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAuBzD;IAEF,QAAQ,CAAC,YAAY,oGAAyB;IAE9C,cAAc,SACJ,MAAM,aACsB;CACtC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Disjoint } from "../../shared/disjoint.js";
|
|
2
|
+
import { BaseRange, parseExclusiveKey } from "./range.js";
|
|
3
|
+
export class MaxNode extends BaseRange {
|
|
4
|
+
static implementation = this.implement({
|
|
5
|
+
collapsibleKey: "rule",
|
|
6
|
+
hasAssociatedError: true,
|
|
7
|
+
keys: {
|
|
8
|
+
rule: {},
|
|
9
|
+
exclusive: parseExclusiveKey
|
|
10
|
+
},
|
|
11
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
12
|
+
defaults: {
|
|
13
|
+
description(node) {
|
|
14
|
+
return `${node.exclusive ? "less than" : "at most"} ${node.rule}`;
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
intersections: {
|
|
18
|
+
max: (l, r) => (l.isStricterThan(r) ? l : r),
|
|
19
|
+
min: (max, min, $) => max.overlapsRange(min)
|
|
20
|
+
? max.overlapIsUnit(min)
|
|
21
|
+
? $.node("unit", { unit: max.rule })
|
|
22
|
+
: null
|
|
23
|
+
: Disjoint.from("range", max, min)
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
impliedBasis = this.$.keywords.number;
|
|
27
|
+
traverseAllows = this.exclusive
|
|
28
|
+
? (data) => data < this.rule
|
|
29
|
+
: (data) => data <= this.rule;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=max.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../constraints/refinements/max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EACN,SAAS,EACT,iBAAiB,EAGjB,MAAM,YAAY,CAAA;AAqBnB,MAAM,OAAO,OAAQ,SAAQ,SAAyB;IACrD,MAAM,CAAC,cAAc,GAAyC,IAAI,CAAC,SAAS,CAAC;QAC5E,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE;YACL,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,iBAAiB;SAC5B;QACD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACrB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;QACvD,QAAQ,EAAE;YACT,WAAW,CAAC,IAAI;gBACf,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;YAClE,CAAC;SACD;QACD,aAAa,EAAE;YACd,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CACpB,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC;gBACrB,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC;oBACvB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;oBACpC,CAAC,CAAC,IAAI;gBACP,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC;SACpC;KACD,CAAC,CAAA;IAEO,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAA;IAE9C,cAAc,GAAG,IAAI,CAAC,SAAS;QAC9B,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QACpC,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { declareNode } from "../../shared/declare.js";
|
|
2
|
+
import type { nodeImplementationOf } from "../../shared/implement.js";
|
|
3
|
+
import { BaseRange, type BaseNormalizedRangeSchema, type BaseRangeInner, type LengthBoundableData } from "./range.js";
|
|
4
|
+
export interface MaxLengthInner extends BaseRangeInner {
|
|
5
|
+
rule: number;
|
|
6
|
+
}
|
|
7
|
+
export interface NormalizedMaxLengthSchema extends BaseNormalizedRangeSchema {
|
|
8
|
+
rule: number;
|
|
9
|
+
}
|
|
10
|
+
export type MaxLengthSchema = NormalizedMaxLengthSchema | number;
|
|
11
|
+
export type MaxLengthDeclaration = declareNode<{
|
|
12
|
+
kind: "maxLength";
|
|
13
|
+
schema: MaxLengthSchema;
|
|
14
|
+
normalizedSchema: NormalizedMaxLengthSchema;
|
|
15
|
+
inner: MaxLengthInner;
|
|
16
|
+
prerequisite: LengthBoundableData;
|
|
17
|
+
errorContext: MaxLengthInner;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class MaxLengthNode extends BaseRange<MaxLengthDeclaration> {
|
|
20
|
+
static implementation: nodeImplementationOf<MaxLengthDeclaration>;
|
|
21
|
+
readonly impliedBasis: import("../../main.js").Type<string | unknown[], import("../../keywords/internal.js").internalPrimitive.exports>;
|
|
22
|
+
traverseAllows: (data: LengthBoundableData) => boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=maxLength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxLength.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/maxLength.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EACN,SAAS,EAET,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,cAAe,SAAQ,cAAc;IACrD,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;IAC3E,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,MAAM,CAAA;AAEhE,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,eAAe,CAAA;IACvB,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,KAAK,EAAE,cAAc,CAAA;IACrB,YAAY,EAAE,mBAAmB,CAAA;IACjC,YAAY,EAAE,cAAc,CAAA;CAC5B,CAAC,CAAA;AAEF,qBAAa,aAAc,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACjE,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CA2B9D;IAEH,QAAQ,CAAC,YAAY,mHAAkC;IAEvD,cAAc,SACJ,mBAAmB,aAC6B;CAC1D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Disjoint } from "../../shared/disjoint.js";
|
|
2
|
+
import { BaseRange, parseExclusiveKey } from "./range.js";
|
|
3
|
+
export class MaxLengthNode extends BaseRange {
|
|
4
|
+
static implementation = this.implement({
|
|
5
|
+
collapsibleKey: "rule",
|
|
6
|
+
hasAssociatedError: true,
|
|
7
|
+
keys: {
|
|
8
|
+
rule: {},
|
|
9
|
+
exclusive: parseExclusiveKey
|
|
10
|
+
},
|
|
11
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
12
|
+
defaults: {
|
|
13
|
+
description(node) {
|
|
14
|
+
return node.exclusive
|
|
15
|
+
? `less than length ${node.rule}`
|
|
16
|
+
: `at most length ${node.rule}`;
|
|
17
|
+
},
|
|
18
|
+
actual: (data) => `${data.length}`
|
|
19
|
+
},
|
|
20
|
+
intersections: {
|
|
21
|
+
maxLength: (l, r) => (l.isStricterThan(r) ? l : r),
|
|
22
|
+
minLength: (max, min, $) => max.overlapsRange(min)
|
|
23
|
+
? max.overlapIsUnit(min)
|
|
24
|
+
? $.node("exactLength", { rule: max.rule })
|
|
25
|
+
: null
|
|
26
|
+
: Disjoint.from("range", max, min)
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
impliedBasis = this.$.keywords.lengthBoundable;
|
|
30
|
+
traverseAllows = this.exclusive
|
|
31
|
+
? (data) => data.length < this.rule
|
|
32
|
+
: (data) => data.length <= this.rule;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=maxLength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxLength.js","sourceRoot":"","sources":["../../../constraints/refinements/maxLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EACN,SAAS,EACT,iBAAiB,EAIjB,MAAM,YAAY,CAAA;AAqBnB,MAAM,OAAO,aAAc,SAAQ,SAA+B;IACjE,MAAM,CAAC,cAAc,GACpB,IAAI,CAAC,SAAS,CAAC;QACd,cAAc,E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AAyB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI;QACxD,CAAC,CAAC,CAAC,IAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { declareNode } from "../../shared/declare.js";
|
|
2
|
+
import type { nodeImplementationOf } from "../../shared/implement.js";
|
|
3
|
+
import { BaseRange, type BaseNormalizedRangeSchema, type BaseRangeInner } from "./range.js";
|
|
4
|
+
export interface MinInner extends BaseRangeInner {
|
|
5
|
+
rule: number;
|
|
6
|
+
}
|
|
7
|
+
export interface NormalizedMinSchema extends BaseNormalizedRangeSchema {
|
|
8
|
+
rule: number;
|
|
9
|
+
}
|
|
10
|
+
export type MinSchema = NormalizedMinSchema | number;
|
|
11
|
+
export type MinDeclaration = declareNode<{
|
|
12
|
+
kind: "min";
|
|
13
|
+
schema: MinSchema;
|
|
14
|
+
normalizedSchema: NormalizedMinSchema;
|
|
15
|
+
inner: MinInner;
|
|
16
|
+
prerequisite: number;
|
|
17
|
+
errorContext: MinInner;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class MinNode extends BaseRange<MinDeclaration> {
|
|
20
|
+
static implementation: nodeImplementationOf<MinDeclaration>;
|
|
21
|
+
readonly impliedBasis: import("../../main.js").Type<number, import("../../keywords/tsPrimitive.js").tsPrimitive.exports>;
|
|
22
|
+
traverseAllows: (data: number) => boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=min.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/min.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EACN,SAAS,EAET,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,QAAS,SAAQ,cAAc;IAC/C,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,mBAAoB,SAAQ,yBAAyB;IACrE,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAEpD,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;IACxC,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,SAAS,CAAA;IACjB,gBAAgB,EAAE,mBAAmB,CAAA;IACrC,KAAK,EAAE,QAAQ,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,QAAQ,CAAA;CACtB,CAAC,CAAA;AAEF,qBAAa,OAAQ,SAAQ,SAAS,CAAC,cAAc,CAAC;IACrD,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAiBzD;IAEF,QAAQ,CAAC,YAAY,oGAAyB;IAE9C,cAAc,SACJ,MAAM,aACsB;CACtC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseRange, parseExclusiveKey } from "./range.js";
|
|
2
|
+
export class MinNode extends BaseRange {
|
|
3
|
+
static implementation = this.implement({
|
|
4
|
+
collapsibleKey: "rule",
|
|
5
|
+
hasAssociatedError: true,
|
|
6
|
+
keys: {
|
|
7
|
+
rule: {},
|
|
8
|
+
exclusive: parseExclusiveKey
|
|
9
|
+
},
|
|
10
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
11
|
+
intersections: {
|
|
12
|
+
min: (l, r) => (l.isStricterThan(r) ? l : r)
|
|
13
|
+
},
|
|
14
|
+
defaults: {
|
|
15
|
+
description(node) {
|
|
16
|
+
return `${node.exclusive ? "more than" : "at least"} ${node.rule}`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
impliedBasis = this.$.keywords.number;
|
|
21
|
+
traverseAllows = this.exclusive
|
|
22
|
+
? (data) => data > this.rule
|
|
23
|
+
: (data) => data >= this.rule;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../constraints/refinements/min.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,SAAS,EACT,iBAAiB,EAGjB,MAAM,YAAY,CAAA;AAqBnB,MAAM,OAAO,OAAQ,SAAQ,SAAyB;IACrD,MAAM,CAAC,cAAc,GAAyC,IAAI,CAAC,SAAS,CAAC;QAC5E,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE;YACL,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,iBAAiB;SAC5B;QACD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACrB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;QACvD,aAAa,EAAE;YACd,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5C;QACD,QAAQ,EAAE;YACT,WAAW,CAAC,IAAI;gBACf,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;YACnE,CAAC;SACD;KACD,CAAC,CAAA;IAEO,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAA;IAE9C,cAAc,GAAG,IAAI,CAAC,SAAS;QAC9B,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QACpC,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { declareNode } from "../../shared/declare.js";
|
|
2
|
+
import type { nodeImplementationOf } from "../../shared/implement.js";
|
|
3
|
+
import { BaseRange, type BaseNormalizedRangeSchema, type BaseRangeInner, type LengthBoundableData } from "./range.js";
|
|
4
|
+
export interface MinLengthInner extends BaseRangeInner {
|
|
5
|
+
rule: number;
|
|
6
|
+
}
|
|
7
|
+
export interface NormalizedMinLengthSchema extends BaseNormalizedRangeSchema {
|
|
8
|
+
rule: number;
|
|
9
|
+
}
|
|
10
|
+
export type MinLengthSchema = NormalizedMinLengthSchema | number;
|
|
11
|
+
export type MinLengthDeclaration = declareNode<{
|
|
12
|
+
kind: "minLength";
|
|
13
|
+
schema: MinLengthSchema;
|
|
14
|
+
normalizedSchema: NormalizedMinLengthSchema;
|
|
15
|
+
inner: MinLengthInner;
|
|
16
|
+
prerequisite: LengthBoundableData;
|
|
17
|
+
errorContext: MinLengthInner;
|
|
18
|
+
}>;
|
|
19
|
+
export declare class MinLengthNode extends BaseRange<MinLengthDeclaration> {
|
|
20
|
+
static implementation: nodeImplementationOf<MinLengthDeclaration>;
|
|
21
|
+
traverseAllows: (data: LengthBoundableData) => boolean;
|
|
22
|
+
readonly impliedBasis: import("../../main.js").Type<string | unknown[], import("../../keywords/internal.js").internalPrimitive.exports>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=minLength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minLength.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/minLength.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EACN,SAAS,EAET,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,cAAe,SAAQ,cAAc;IACrD,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB;IAC3E,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,MAAM,CAAA;AAEhE,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,eAAe,CAAA;IACvB,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,KAAK,EAAE,cAAc,CAAA;IACrB,YAAY,EAAE,mBAAmB,CAAA;IACjC,YAAY,EAAE,cAAc,CAAA;CAC5B,CAAC,CAAA;AAEF,qBAAa,aAAc,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACjE,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAyB9D;IAEH,cAAc,SACJ,mBAAmB,aAC6B;IAE1D,QAAQ,CAAC,YAAY,mHAAkC;CACvD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseRange, parseExclusiveKey } from "./range.js";
|
|
2
|
+
export class MinLengthNode extends BaseRange {
|
|
3
|
+
static implementation = this.implement({
|
|
4
|
+
collapsibleKey: "rule",
|
|
5
|
+
hasAssociatedError: true,
|
|
6
|
+
keys: {
|
|
7
|
+
rule: {},
|
|
8
|
+
exclusive: parseExclusiveKey
|
|
9
|
+
},
|
|
10
|
+
normalize: (schema) => typeof schema === "number" ? { rule: schema } : schema,
|
|
11
|
+
defaults: {
|
|
12
|
+
description(node) {
|
|
13
|
+
return node.exclusive
|
|
14
|
+
? node.rule === 0
|
|
15
|
+
? "non-empty"
|
|
16
|
+
: `more than length ${node.rule}`
|
|
17
|
+
: node.rule === 1
|
|
18
|
+
? "non-empty"
|
|
19
|
+
: `at least length ${node.rule}`;
|
|
20
|
+
},
|
|
21
|
+
actual: (data) => `${data.length}`
|
|
22
|
+
},
|
|
23
|
+
intersections: {
|
|
24
|
+
minLength: (l, r) => (l.isStricterThan(r) ? l : r)
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
traverseAllows = this.exclusive
|
|
28
|
+
? (data) => data.length > this.rule
|
|
29
|
+
: (data) => data.length >= this.rule;
|
|
30
|
+
impliedBasis = this.$.keywords.lengthBoundable;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=minLength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minLength.js","sourceRoot":"","sources":["../../../constraints/refinements/minLength.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,SAAS,EACT,iBAAiB,EAIjB,MAAM,YAAY,CAAA;AAqBnB,MAAM,OAAO,aAAc,SAAQ,SAA+B;IACjE,MAAM,CAAC,cAAc,GACpB,IAAI,CAAC,SAAS,CAAC;QACd,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE;YACL,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,iBAAiB;SAC5B;QACD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CACrB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;QACvD,QAAQ,EAAE;YACT,WAAW,CAAC,IAAI;gBACf,OAAO,IAAI,CAAC,SAAS;oBACpB,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC;wBAChB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,oBAAoB,IAAI,CAAC,IAAI,EAAE;oBAClC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC;wBACjB,CAAC,CAAC,WAAW;wBACb,CAAC,CAAC,mBAAmB,IAAI,CAAC,IAAI,EAAE,CAAA;YAClC,CAAC;YACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;SAClC;QACD,aAAa,EAAE;YACd,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAClD;KACD,CAAC,CAAA;IAEH,cAAc,GAAG,IAAI,CAAC,SAAS;QAC9B,CAAC,CAAC,CAAC,IAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI;QACxD,CAAC,CAAC,CAAC,IAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAA;IAEjD,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type array, type valueOf } from "@arktype/util";
|
|
2
|
+
import type { Node } from "../../base.js";
|
|
3
|
+
import type { BaseMeta, BaseNodeDeclaration } from "../../shared/declare.js";
|
|
4
|
+
import type { KeyDefinitions, RangeKind } from "../../shared/implement.js";
|
|
5
|
+
import { BasePrimitiveConstraint } from "../constraint.js";
|
|
6
|
+
export declare abstract class BaseRange<d extends BaseRangeDeclaration> extends BasePrimitiveConstraint<d> {
|
|
7
|
+
readonly boundOperandKind: {
|
|
8
|
+
readonly min: "value";
|
|
9
|
+
readonly max: "value";
|
|
10
|
+
readonly minLength: "length";
|
|
11
|
+
readonly maxLength: "length";
|
|
12
|
+
readonly after: "date";
|
|
13
|
+
readonly before: "date";
|
|
14
|
+
}[d["kind"]];
|
|
15
|
+
readonly compiledActual: string;
|
|
16
|
+
readonly comparator: ">" | "<" | ">=" | "<=";
|
|
17
|
+
readonly numericLimit: number;
|
|
18
|
+
readonly expression: string;
|
|
19
|
+
readonly compiledCondition: string;
|
|
20
|
+
readonly compiledNegation: string;
|
|
21
|
+
readonly stringLimit: string;
|
|
22
|
+
readonly errorContext: import("../../shared/declare.js").BaseErrorContext<d["kind"]> & d["inner"] extends infer T ? { [k in keyof T]: (import("../../shared/declare.js").BaseErrorContext<d["kind"]> & d["inner"])[k]; } : never;
|
|
23
|
+
readonly limitKind: LimitKind;
|
|
24
|
+
isStricterThan(r: Node<d["kind"] | pairedRangeKind<d["kind"]>>): boolean;
|
|
25
|
+
overlapsRange(r: Node<pairedRangeKind<d["kind"]>>): boolean;
|
|
26
|
+
overlapIsUnit(r: Node<pairedRangeKind<d["kind"]>>): boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface BaseRangeInner extends BaseMeta {
|
|
29
|
+
readonly rule: number | Date;
|
|
30
|
+
readonly exclusive?: true;
|
|
31
|
+
}
|
|
32
|
+
export type LimitSchemaValue<kind extends RangeKind = RangeKind> = kind extends "before" | "after" ? Date | number | string : number;
|
|
33
|
+
export type LimitInnerValue<kind extends RangeKind = RangeKind> = kind extends "before" | "after" ? Date : number;
|
|
34
|
+
export interface BaseNormalizedRangeSchema extends BaseMeta {
|
|
35
|
+
readonly exclusive?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export type LimitKind = "lower" | "upper";
|
|
38
|
+
export type RelativeComparator<kind extends LimitKind = LimitKind> = {
|
|
39
|
+
lower: ">" | ">=";
|
|
40
|
+
upper: "<" | "<=";
|
|
41
|
+
}[kind];
|
|
42
|
+
export declare const negatedComparators: {
|
|
43
|
+
readonly "<": ">=";
|
|
44
|
+
readonly "<=": ">";
|
|
45
|
+
readonly ">": "<=";
|
|
46
|
+
readonly ">=": "<";
|
|
47
|
+
};
|
|
48
|
+
export declare const boundKindPairsByLower: {
|
|
49
|
+
readonly min: "max";
|
|
50
|
+
readonly minLength: "maxLength";
|
|
51
|
+
readonly after: "before";
|
|
52
|
+
};
|
|
53
|
+
type BoundKindPairsByLower = typeof boundKindPairsByLower;
|
|
54
|
+
export declare const boundKindPairsByUpper: {
|
|
55
|
+
max: "min";
|
|
56
|
+
maxLength: "minLength";
|
|
57
|
+
before: "after";
|
|
58
|
+
};
|
|
59
|
+
type BoundKindPairsByUpper = typeof boundKindPairsByUpper;
|
|
60
|
+
export type pairedRangeKind<kind extends RangeKind> = kind extends LowerBoundKind ? BoundKindPairsByLower[kind] : BoundKindPairsByUpper[kind & UpperBoundKind];
|
|
61
|
+
export type LowerBoundKind = keyof typeof boundKindPairsByLower;
|
|
62
|
+
export type LowerNode = Node<LowerBoundKind>;
|
|
63
|
+
export type UpperBoundKind = valueOf<typeof boundKindPairsByLower>;
|
|
64
|
+
export type UpperNode = Node<UpperBoundKind>;
|
|
65
|
+
export type NumericallyBoundable = string | number | array;
|
|
66
|
+
export type Boundable = NumericallyBoundable | Date;
|
|
67
|
+
export declare const parseExclusiveKey: KeyDefinitions<BaseRangeDeclaration>["exclusive"];
|
|
68
|
+
export declare const parseDateLimit: (limit: LimitSchemaValue) => Date;
|
|
69
|
+
export interface BaseRangeDeclaration extends BaseNodeDeclaration {
|
|
70
|
+
kind: RangeKind;
|
|
71
|
+
inner: BaseRangeInner;
|
|
72
|
+
normalizedSchema: BaseNormalizedRangeSchema;
|
|
73
|
+
}
|
|
74
|
+
export declare const operandKindsByBoundKind: {
|
|
75
|
+
readonly min: "value";
|
|
76
|
+
readonly max: "value";
|
|
77
|
+
readonly minLength: "length";
|
|
78
|
+
readonly maxLength: "length";
|
|
79
|
+
readonly after: "date";
|
|
80
|
+
readonly before: "date";
|
|
81
|
+
};
|
|
82
|
+
export declare const compileComparator: (kind: RangeKind, exclusive: boolean | undefined) => ">" | "<" | ">=" | "<=";
|
|
83
|
+
export type BoundOperandKind = "value" | "length" | "date";
|
|
84
|
+
export type LengthBoundableData = string | array;
|
|
85
|
+
export type DateRangeKind = "before" | "after";
|
|
86
|
+
export declare const dateLimitToString: (limit: LimitSchemaValue) => string;
|
|
87
|
+
export declare const writeUnboundableMessage: <root extends string>(root: root) => `Bounded expression ${root} must be a number, string, Array, or Date`;
|
|
88
|
+
export type writeUnboundableMessage<root extends string> = `Bounded expression ${root} must be a number, string, Array, or Date`;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,KAAK,EAEV,KAAK,OAAO,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,8BAAsB,SAAS,CAC9B,CAAC,SAAS,oBAAoB,CAC7B,SAAQ,uBAAuB,CAAC,CAAC,CAAC;IACnC,QAAQ,CAAC,gBAAgB;;;;;;;iBAAqC;IAC9D,QAAQ,CAAC,cAAc,SAKH;IACpB,QAAQ,CAAC,UAAU,0BAA+C;IAClE,QAAQ,CAAC,YAAY,SAAsB;IAC3C,QAAQ,CAAC,UAAU,SAAmC;IACtD,QAAQ,CAAC,iBAAiB,SAAmE;IAC7F,QAAQ,CAAC,gBAAgB,SAEF;IAIvB,QAAQ,CAAC,WAAW,SAGM;IAC1B,QAAQ,CAAC,YAAY,4MAAsC;IAC3D,QAAQ,CAAC,SAAS,EAAE,SAAS,CACoB;IAEjD,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO;IAaxE,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CA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