@strictly/define 0.0.30 → 0.0.31
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/.out/index.d.ts +26 -26
- package/.out/index.js +26 -26
- package/.out/transformers/copies/copy.d.ts +3 -3
- package/.out/transformers/copies/copy.js +1 -1
- package/.out/transformers/copies/{copy_to.d.ts → copyTo.d.ts} +3 -3
- package/.out/transformers/copies/{copy_to.js → copyTo.js} +1 -1
- package/.out/transformers/copies/mobxCopy.d.ts +5 -0
- package/.out/transformers/copies/{mobx_copy.js → mobxCopy.js} +3 -3
- package/.out/transformers/copies/specs/{copy_to.tests.js → copyTo.tests.js} +2 -2
- package/.out/transformers/copies/specs/{mobx_copy.tests.js → mobxCopy.tests.js} +1 -1
- package/.out/transformers/equals.d.ts +2 -2
- package/.out/transformers/equals.js +1 -1
- package/.out/transformers/flatteners/{flatten_accessors_of_type.d.ts → flattenAccessorsOfType.d.ts} +4 -4
- package/.out/transformers/flatteners/{flatten_accessors_of_type.js → flattenAccessorsOfType.js} +1 -1
- package/.out/transformers/flatteners/{flatten_json_value_to_type_paths_of.d.ts → flattenJsonValueToTypePathsOf.d.ts} +2 -2
- package/.out/transformers/flatteners/{flatten_json_value_to_type_paths_of.js → flattenJsonValueToTypePathsOf.js} +1 -1
- package/.out/transformers/flatteners/{flatten_type_to.d.ts → flattenTypeTo.d.ts} +1 -1
- package/.out/transformers/flatteners/{flatten_type_to.js → flattenTypeTo.js} +2 -2
- package/.out/transformers/flatteners/flattenTypesOfType.d.ts +3 -0
- package/.out/transformers/flatteners/{flatten_types_of_type.js → flattenTypesOfType.js} +1 -1
- package/.out/transformers/flatteners/{flatten_validation_errors_of_type.d.ts → flattenValidationErrorsOfType.d.ts} +5 -5
- package/.out/transformers/flatteners/{flatten_validation_errors_of_type.js → flattenValidationErrorsOfType.js} +1 -1
- package/.out/transformers/flatteners/{flatten_validators_of_validating_type.d.ts → flattenValidatorsOfValidatingType.d.ts} +3 -3
- package/.out/transformers/flatteners/{flatten_validators_of_validating_type.js → flattenValidatorsOfValidatingType.js} +1 -1
- package/.out/transformers/flatteners/{flatten_value_to.d.ts → flattenValueTo.d.ts} +4 -4
- package/.out/transformers/flatteners/{flatten_value_to.js → flattenValueTo.js} +2 -2
- package/.out/transformers/flatteners/{flatten_values_of_type.d.ts → flattenValuesOfType.d.ts} +2 -2
- package/.out/transformers/flatteners/{flatten_values_of_type.js → flattenValuesOfType.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_accessors_of_type.tests.js → flattenAccessorsOfType.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_json_value_to_type_paths_of.tests.js → flattenJsonValueToTypePathsOf.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_type_to.tests.js → flattenTypeTo.tests.js} +2 -2
- package/.out/transformers/flatteners/specs/{flatten_types_of_type.tests.js → flattenTypesOfType.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_validation_errors_of_type.tests.js → flattenValidationErrorsOfType.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_value_to.tests.js → flattenValueTo.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{flatten_values_of_type.tests.js → flattenValuesOfType.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{json_paths.tests.js → jsonPaths.tests.js} +1 -1
- package/.out/transformers/flatteners/specs/{value_path_to_type_path.tests.js → valuePathToTypePath.tests.js} +1 -1
- package/.out/transformers/flatteners/{value_path_to_type_path.d.ts → valuePathToTypePath.d.ts} +1 -1
- package/.out/transformers/flatteners/{value_path_to_type_path.js → valuePathToTypePath.js} +1 -1
- package/.out/tsconfig.tsbuildinfo +1 -1
- package/.out/types/{flattened_accessors_of_type.d.ts → FlattenedAccessorsOfType.d.ts} +2 -2
- package/.out/types/{flattened_types_of_type.d.ts → FlattenedTypesOfType.d.ts} +2 -2
- package/.out/types/{flattened_types_of_validating_type.d.ts → FlattenedTypesOfValidatingType.d.ts} +3 -3
- package/.out/types/{flattened_validators_of_validating_type.d.ts → FlattenedValidatorsOfValidatingType.d.ts} +4 -4
- package/.out/types/{flattened_values_of_type.d.ts → FlattenedValuesOfType.d.ts} +3 -3
- package/.out/types/{mobx_value_of_type.d.ts → MobxValueOfType.d.ts} +2 -2
- package/.out/types/{partial_type_of_type.d.ts → PartialTypeOfType.d.ts} +1 -1
- package/.out/types/{paths_of_type.d.ts → PathsOfType.d.ts} +2 -2
- package/.out/types/{readonly_type_of_type.d.ts → ReadonlyTypeOfType.d.ts} +1 -1
- package/.out/types/{strict_definitions.d.ts → StrictType.d.ts} +1 -1
- package/.out/types/{validating_definitions.d.ts → ValidatingType.d.ts} +1 -1
- package/.out/types/{validating_type_def_with_error.d.ts → ValidatingTypeDefWithError.d.ts} +2 -2
- package/.out/types/{value_of_type.d.ts → ValueOfType.d.ts} +1 -1
- package/.out/types/{value_to_type_paths_of_type.d.ts → ValueToTypePathsOfType.d.ts} +3 -3
- package/.out/types/{value_types_of_discriminated_union.d.ts → ValueTypesOfDiscriminatedUnion.d.ts} +3 -3
- package/.out/types/builders.d.ts +5 -5
- package/.out/types/builders.js +2 -2
- package/.out/types/flattened.d.ts +1 -1
- package/.out/types/specs/builder.tests.js +1 -1
- package/.out/types/{type_of_type.d.ts → typeOfType.d.ts} +1 -1
- package/.out/types/{type_of_type.js → typeOfType.js} +1 -1
- package/.out/validation/validator.js +1 -1
- package/.out/validation/validators/specs/{minimum_string_length_validator.tests.js → minimumStringLengthValidator.tests.js} +1 -1
- package/.out/validation/validators/specs/{regexp_validator.tests.js → regexpValidator.tests.js} +1 -1
- package/.turbo/turbo-build.log +6 -6
- package/.turbo/turbo-release$colon$exports.log +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -22
- package/index.ts +26 -26
- package/package.json +1 -1
- package/transformers/copies/copy.ts +4 -4
- package/transformers/copies/{copy_to.ts → copyTo.ts} +9 -9
- package/transformers/copies/{mobx_copy.ts → mobxCopy.ts} +10 -10
- package/transformers/copies/specs/{copy_to.tests.ts → copyTo.tests.ts} +3 -3
- package/transformers/copies/specs/{mobx_copy.tests.ts → mobxCopy.tests.ts} +2 -2
- package/transformers/equals.ts +2 -2
- package/transformers/flatteners/{flatten_accessors_of_type.ts → flattenAccessorsOfType.ts} +7 -7
- package/transformers/flatteners/{flatten_json_value_to_type_paths_of.ts → flattenJsonValueToTypePathsOf.ts} +3 -3
- package/transformers/flatteners/{flatten_type_to.ts → flattenTypeTo.ts} +3 -5
- package/transformers/flatteners/{flatten_types_of_type.ts → flattenTypesOfType.ts} +3 -3
- package/transformers/flatteners/{flatten_validation_errors_of_type.ts → flattenValidationErrorsOfType.ts} +8 -8
- package/transformers/flatteners/{flatten_validators_of_validating_type.ts → flattenValidatorsOfValidatingType.ts} +4 -4
- package/transformers/flatteners/{flatten_value_to.ts → flattenValueTo.ts} +9 -9
- package/transformers/flatteners/{flatten_values_of_type.ts → flattenValuesOfType.ts} +4 -4
- package/transformers/flatteners/specs/{flatten_accessors_of_type.tests.ts → flattenAccessorsOfType.tests.ts} +3 -3
- package/transformers/flatteners/specs/{flatten_json_value_to_type_paths_of.tests.ts → flattenJsonValueToTypePathsOf.tests.ts} +1 -1
- package/transformers/flatteners/specs/{flatten_type_to.tests.ts → flattenTypeTo.tests.ts} +2 -2
- package/transformers/flatteners/specs/{flatten_types_of_type.tests.ts → flattenTypesOfType.tests.ts} +1 -1
- package/transformers/flatteners/specs/{flatten_validation_errors_of_type.tests.ts → flattenValidationErrorsOfType.tests.ts} +2 -2
- package/transformers/flatteners/specs/{flatten_value_to.tests.ts → flattenValueTo.tests.ts} +4 -4
- package/transformers/flatteners/specs/{flatten_values_of_type.tests.ts → flattenValuesOfType.tests.ts} +1 -1
- package/transformers/flatteners/specs/{json_paths.tests.ts → jsonPaths.tests.ts} +1 -1
- package/transformers/flatteners/specs/{value_path_to_type_path.tests.ts → valuePathToTypePath.tests.ts} +2 -2
- package/transformers/flatteners/{value_path_to_type_path.ts → valuePathToTypePath.ts} +1 -1
- package/types/{flattened_accessors_of_type.ts → FlattenedAccessorsOfType.ts} +2 -2
- package/types/{flattened_types_of_type.ts → FlattenedTypesOfType.ts} +6 -6
- package/types/{flattened_types_of_validating_type.ts → FlattenedTypesOfValidatingType.ts} +6 -6
- package/types/{flattened_validators_of_validating_type.ts → FlattenedValidatorsOfValidatingType.ts} +4 -4
- package/types/{flattened_values_of_type.ts → FlattenedValuesOfType.ts} +3 -3
- package/types/{mobx_value_of_type.ts → MobxValueOfType.ts} +2 -2
- package/types/{partial_type_of_type.ts → PartialTypeOfType.ts} +1 -1
- package/types/{paths_of_type.ts → PathsOfType.ts} +6 -6
- package/types/{readonly_type_of_type.ts → ReadonlyTypeOfType.ts} +1 -1
- package/types/{strict_definitions.ts → StrictType.ts} +1 -1
- package/types/{validating_definitions.ts → ValidatingType.ts} +1 -1
- package/types/{validating_type_def_with_error.ts → ValidatingTypeDefWithError.ts} +2 -2
- package/types/{value_of_type.ts → ValueOfType.ts} +1 -1
- package/types/{value_to_type_paths_of_type.ts → ValueToTypePathsOfType.ts} +7 -7
- package/types/{value_types_of_discriminated_union.ts → ValueTypesOfDiscriminatedUnion.ts} +3 -3
- package/types/builders.ts +5 -5
- package/types/flattened.ts +1 -1
- package/types/specs/{flattened_accessors_of_type.tests.ts → FlattenedAccessorsOfType.tests.ts} +1 -1
- package/types/specs/{flattened_types_of_type.tests.ts → FlattenedTypesOfType.tests.ts} +2 -2
- package/types/specs/{flattened_validators_of_validating_type.tests.ts → FlattenedValidatorsOfValidatingType.tests.ts} +2 -2
- package/types/specs/{flattened_values_of_type.tests.ts → FlattenedValuesOfType.tests.ts} +1 -1
- package/types/specs/{partial_type_of_type.tests.ts → PartialTypeOfType.tests.ts} +2 -2
- package/types/specs/{paths_of_type.tests.ts → PathsOfType.tests.ts} +1 -1
- package/types/specs/{readonly_type_of_type.tests.ts → ReadonlyTypeOfType.tests.ts} +2 -2
- package/types/specs/{strict_definitions.tests.ts → StrictType.tests.ts} +5 -5
- package/types/specs/{type_of_type.tests.ts → TypeOfType.tests.ts} +2 -2
- package/types/specs/{value_of_type.tests.ts → ValueOfType.tests.ts} +2 -2
- package/types/specs/{value_to_type_paths_of_type.tests.ts → ValueToTypePathsOfType.tests.ts} +2 -2
- package/types/specs/{value_types_of_discriminated_union.tests.ts → ValueTypesOfDiscriminatedUnion.tests.ts} +1 -1
- package/types/specs/builder.tests.ts +2 -2
- package/types/{type_of_type.ts → typeOfType.ts} +1 -1
- package/validation/specs/{errors_of_validators.tests.ts → errorsOfValidators.tests.ts} +1 -1
- package/validation/specs/{validators_of_values.tests.ts → validatorsOfValues.tests.ts} +1 -1
- package/validation/validator.ts +1 -1
- package/validation/validators/specs/{minimum_string_length_validator.tests.ts → minimumStringLengthValidator.tests.ts} +1 -1
- package/validation/validators/specs/{regexp_validator.tests.ts → regexpValidator.tests.ts} +1 -1
- package/.out/transformers/copies/mobx_copy.d.ts +0 -5
- package/.out/transformers/flatteners/flatten_types_of_type.d.ts +0 -3
- /package/.out/transformers/copies/specs/{copy_to.tests.d.ts → copyTo.tests.d.ts} +0 -0
- /package/.out/transformers/copies/specs/{mobx_copy.tests.d.ts → mobxCopy.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/{json_path.d.ts → jsonPath.d.ts} +0 -0
- /package/.out/transformers/flatteners/{json_path.js → jsonPath.js} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_accessors_of_type.tests.d.ts → flattenAccessorsOfType.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_json_value_to_type_paths_of.tests.d.ts → flattenJsonValueToTypePathsOf.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_type_to.tests.d.ts → flattenTypeTo.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_types_of_type.tests.d.ts → flattenTypesOfType.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_validation_errors_of_type.tests.d.ts → flattenValidationErrorsOfType.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_value_to.tests.d.ts → flattenValueTo.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{flatten_values_of_type.tests.d.ts → flattenValuesOfType.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{json_paths.tests.d.ts → jsonPaths.tests.d.ts} +0 -0
- /package/.out/transformers/flatteners/specs/{value_path_to_type_path.tests.d.ts → valuePathToTypePath.tests.d.ts} +0 -0
- /package/.out/types/{flattened_accessors_of_type.js → FlattenedAccessorsOfType.js} +0 -0
- /package/.out/types/{flattened_types_of_type.js → FlattenedTypesOfType.js} +0 -0
- /package/.out/types/{flattened_types_of_validating_type.js → FlattenedTypesOfValidatingType.js} +0 -0
- /package/.out/types/{flattened_validators_of_validating_type.js → FlattenedValidatorsOfValidatingType.js} +0 -0
- /package/.out/types/{flattened_values_of_type.js → FlattenedValuesOfType.js} +0 -0
- /package/.out/types/{mobx_value_of_type.js → MobxValueOfType.js} +0 -0
- /package/.out/types/{partial_type_of_type.js → PartialTypeOfType.js} +0 -0
- /package/.out/types/{path_of.d.ts → PathOf.d.ts} +0 -0
- /package/.out/types/{path_of.js → PathOf.js} +0 -0
- /package/.out/types/{paths_of_type.js → PathsOfType.js} +0 -0
- /package/.out/types/{readonly_type_of_type.js → ReadonlyTypeOfType.js} +0 -0
- /package/.out/types/{specs/flattened_accessors_of_type.tests.d.ts → StrictType.js} +0 -0
- /package/.out/types/{definitions.d.ts → Type.d.ts} +0 -0
- /package/.out/types/{definitions.js → Type.js} +0 -0
- /package/.out/types/{specs/flattened_types_of_type.tests.d.ts → ValidatingType.js} +0 -0
- /package/.out/types/{specs/flattened_validators_of_validating_type.tests.d.ts → ValidatingTypeDefWithError.js} +0 -0
- /package/.out/types/{specs/flattened_values_of_type.tests.d.ts → ValueOfType.js} +0 -0
- /package/.out/types/{specs/partial_type_of_type.tests.d.ts → ValueToTypePathsOfType.js} +0 -0
- /package/.out/types/{specs/paths_of_type.tests.d.ts → ValueTypesOfDiscriminatedUnion.js} +0 -0
- /package/.out/types/specs/{readonly_type_of_type.tests.d.ts → FlattenedAccessorsOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{flattened_accessors_of_type.tests.js → FlattenedAccessorsOfType.tests.js} +0 -0
- /package/.out/types/specs/{strict_definitions.tests.d.ts → FlattenedTypesOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{flattened_types_of_type.tests.js → FlattenedTypesOfType.tests.js} +0 -0
- /package/.out/types/specs/{type_of_type.tests.d.ts → FlattenedValidatorsOfValidatingType.tests.d.ts} +0 -0
- /package/.out/types/specs/{flattened_validators_of_validating_type.tests.js → FlattenedValidatorsOfValidatingType.tests.js} +0 -0
- /package/.out/types/specs/{value_of_type.tests.d.ts → FlattenedValuesOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{flattened_values_of_type.tests.js → FlattenedValuesOfType.tests.js} +0 -0
- /package/.out/types/specs/{value_to_type_paths_of_type.tests.d.ts → PartialTypeOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{partial_type_of_type.tests.js → PartialTypeOfType.tests.js} +0 -0
- /package/.out/types/specs/{value_types_of_discriminated_union.tests.d.ts → PathsOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{paths_of_type.tests.js → PathsOfType.tests.js} +0 -0
- /package/.out/types/{strict_definitions.js → specs/ReadonlyTypeOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{readonly_type_of_type.tests.js → ReadonlyTypeOfType.tests.js} +0 -0
- /package/.out/types/{validating_definitions.js → specs/StrictType.tests.d.ts} +0 -0
- /package/.out/types/specs/{strict_definitions.tests.js → StrictType.tests.js} +0 -0
- /package/.out/types/{validating_type_def_with_error.js → specs/TypeOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{type_of_type.tests.js → TypeOfType.tests.js} +0 -0
- /package/.out/types/{value_of_type.js → specs/ValueOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{value_of_type.tests.js → ValueOfType.tests.js} +0 -0
- /package/.out/types/{value_to_type_paths_of_type.js → specs/ValueToTypePathsOfType.tests.d.ts} +0 -0
- /package/.out/types/specs/{value_to_type_paths_of_type.tests.js → ValueToTypePathsOfType.tests.js} +0 -0
- /package/.out/types/{value_types_of_discriminated_union.js → specs/ValueTypesOfDiscriminatedUnion.tests.d.ts} +0 -0
- /package/.out/types/specs/{value_types_of_discriminated_union.tests.js → ValueTypesOfDiscriminatedUnion.tests.js} +0 -0
- /package/.out/validation/{errors_of_validators.d.ts → ErrorsOfValidators.d.ts} +0 -0
- /package/.out/validation/{errors_of_validators.js → ErrorsOfValidators.js} +0 -0
- /package/.out/validation/{validators_of_values.d.ts → ValidatorsOfValues.d.ts} +0 -0
- /package/.out/validation/{specs/errors_of_validators.tests.d.ts → ValidatorsOfValues.js} +0 -0
- /package/.out/validation/specs/{validators_of_values.tests.d.ts → errorsOfValidators.tests.d.ts} +0 -0
- /package/.out/validation/specs/{errors_of_validators.tests.js → errorsOfValidators.tests.js} +0 -0
- /package/.out/validation/{validators/specs/minimum_string_length_validator.tests.d.ts → specs/validatorsOfValues.tests.d.ts} +0 -0
- /package/.out/validation/specs/{validators_of_values.tests.js → validatorsOfValues.tests.js} +0 -0
- /package/.out/validation/validators/{composite_validator.d.ts → CompositeValidator.d.ts} +0 -0
- /package/.out/validation/validators/{composite_validator.js → CompositeValidator.js} +0 -0
- /package/.out/validation/validators/{defined_validator.d.ts → DefinedValidator.d.ts} +0 -0
- /package/.out/validation/validators/{defined_validator.js → DefinedValidator.js} +0 -0
- /package/.out/validation/validators/{maximum_string_length_validator.d.ts → MaximumStringLengthValidator.d.ts} +0 -0
- /package/.out/validation/validators/{maximum_string_length_validator.js → MaximumStringLengthValidator.js} +0 -0
- /package/.out/validation/validators/{minimum_string_length_validator.d.ts → MinimumStringLengthValidator.d.ts} +0 -0
- /package/.out/validation/validators/{minimum_string_length_validator.js → MinimumStringLengthValidator.js} +0 -0
- /package/.out/validation/validators/{optional_validator_proxy.d.ts → OptionalValidatorProxy.d.ts} +0 -0
- /package/.out/validation/validators/{optional_validator_proxy.js → OptionalValidatorProxy.js} +0 -0
- /package/.out/validation/validators/{regexp_validator.d.ts → RegexpValidator.d.ts} +0 -0
- /package/.out/validation/validators/{regexp_validator.js → RegexpValidator.js} +0 -0
- /package/.out/validation/validators/specs/{regexp_validator.tests.d.ts → minimumStringLengthValidator.tests.d.ts} +0 -0
- /package/.out/validation/{validators_of_values.js → validators/specs/regexpValidator.tests.d.ts} +0 -0
- /package/transformers/flatteners/{json_path.ts → jsonPath.ts} +0 -0
- /package/types/{path_of.ts → PathOf.ts} +0 -0
- /package/types/{definitions.ts → Type.ts} +0 -0
- /package/validation/{errors_of_validators.ts → ErrorsOfValidators.ts} +0 -0
- /package/validation/{validators_of_values.ts → ValidatorsOfValues.ts} +0 -0
- /package/validation/validators/{composite_validator.ts → CompositeValidator.ts} +0 -0
- /package/validation/validators/{defined_validator.ts → DefinedValidator.ts} +0 -0
- /package/validation/validators/{maximum_string_length_validator.ts → MaximumStringLengthValidator.ts} +0 -0
- /package/validation/validators/{minimum_string_length_validator.ts → MinimumStringLengthValidator.ts} +0 -0
- /package/validation/validators/{optional_validator_proxy.ts → OptionalValidatorProxy.ts} +0 -0
- /package/validation/validators/{regexp_validator.ts → RegexpValidator.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
21
|
|
|
22
|
-
// transformers/copies/
|
|
22
|
+
// transformers/copies/copyTo.ts
|
|
23
23
|
import {
|
|
24
24
|
map,
|
|
25
25
|
reduce,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
UnreachableError
|
|
28
28
|
} from "@strictly/base";
|
|
29
29
|
|
|
30
|
-
// types/
|
|
30
|
+
// types/Type.ts
|
|
31
31
|
var TypeDefType = /* @__PURE__ */ ((TypeDefType2) => {
|
|
32
32
|
TypeDefType2[TypeDefType2["Literal"] = 1] = "Literal";
|
|
33
33
|
TypeDefType2[TypeDefType2["List"] = 2] = "List";
|
|
@@ -37,7 +37,7 @@ var TypeDefType = /* @__PURE__ */ ((TypeDefType2) => {
|
|
|
37
37
|
return TypeDefType2;
|
|
38
38
|
})(TypeDefType || {});
|
|
39
39
|
|
|
40
|
-
// transformers/copies/
|
|
40
|
+
// transformers/copies/copyTo.ts
|
|
41
41
|
function copyTo({ definition }, value, copier) {
|
|
42
42
|
return internalCopyTo(
|
|
43
43
|
definition,
|
|
@@ -168,7 +168,7 @@ function copy(t, proto) {
|
|
|
168
168
|
return copyTo(t, proto, identity);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
// transformers/copies/
|
|
171
|
+
// transformers/copies/mobxCopy.ts
|
|
172
172
|
import {
|
|
173
173
|
reduce as reduce3,
|
|
174
174
|
UnreachableError as UnreachableError3
|
|
@@ -178,13 +178,13 @@ import {
|
|
|
178
178
|
observable
|
|
179
179
|
} from "mobx";
|
|
180
180
|
|
|
181
|
-
// transformers/flatteners/
|
|
181
|
+
// transformers/flatteners/flattenValueTo.ts
|
|
182
182
|
import {
|
|
183
183
|
reduce as reduce2,
|
|
184
184
|
UnreachableError as UnreachableError2
|
|
185
185
|
} from "@strictly/base";
|
|
186
186
|
|
|
187
|
-
// transformers/flatteners/
|
|
187
|
+
// transformers/flatteners/jsonPath.ts
|
|
188
188
|
import {
|
|
189
189
|
assertEqual,
|
|
190
190
|
assertState
|
|
@@ -212,7 +212,7 @@ function jsonPathUnprefix(prefix, path) {
|
|
|
212
212
|
return `$${path.slice(prefix.length)}`;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
// transformers/flatteners/
|
|
215
|
+
// transformers/flatteners/flattenValueTo.ts
|
|
216
216
|
function flattenValueTo({ definition }, v, setter, mapper2, listIndicesToKeys = {}) {
|
|
217
217
|
const r = {};
|
|
218
218
|
internalFlattenValue(
|
|
@@ -353,7 +353,7 @@ function getUnionTypeDef(typeDef, v) {
|
|
|
353
353
|
return typeDef.unions[v[typeDef.discriminator]];
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
// transformers/copies/
|
|
356
|
+
// transformers/copies/mobxCopy.ts
|
|
357
357
|
function observeValue(v, def) {
|
|
358
358
|
if (v == null) {
|
|
359
359
|
return v;
|
|
@@ -463,7 +463,7 @@ function internalUnionEquals({
|
|
|
463
463
|
return o1 === o2 || variableTypeDefs.length === 1 && internalEquals(variableTypeDefs[0], o1, o2);
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
// transformers/flatteners/
|
|
466
|
+
// transformers/flatteners/flattenAccessorsOfType.ts
|
|
467
467
|
function mapAccessor(_t, value, set) {
|
|
468
468
|
return {
|
|
469
469
|
value,
|
|
@@ -480,7 +480,7 @@ function flattenAccessorsOfType(t, value, setValue, listIndicesToKeys) {
|
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
// transformers/flatteners/
|
|
483
|
+
// transformers/flatteners/flattenJsonValueToTypePathsOf.ts
|
|
484
484
|
function mapTypePaths(_t, _value, _set, typePath) {
|
|
485
485
|
return typePath;
|
|
486
486
|
}
|
|
@@ -495,7 +495,7 @@ function flattenJsonValueToTypePathsOf(t, value, listIndicesToKeys) {
|
|
|
495
495
|
);
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
// transformers/flatteners/
|
|
498
|
+
// transformers/flatteners/flattenTypeTo.ts
|
|
499
499
|
import {
|
|
500
500
|
reduce as reduce4,
|
|
501
501
|
UnreachableError as UnreachableError5
|
|
@@ -569,7 +569,7 @@ function internalFlattenUnionTypeDefChildren(path, qualifier, {
|
|
|
569
569
|
);
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
-
// transformers/flatteners/
|
|
572
|
+
// transformers/flatteners/flattenTypesOfType.ts
|
|
573
573
|
function flattenTypesOfType(t) {
|
|
574
574
|
return flattenTypeTo(
|
|
575
575
|
t,
|
|
@@ -579,7 +579,7 @@ function flattenTypesOfType(t) {
|
|
|
579
579
|
);
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
// transformers/flatteners/
|
|
582
|
+
// transformers/flatteners/flattenValidatorsOfValidatingType.ts
|
|
583
583
|
function flattenValidatorsOfValidatingType(type) {
|
|
584
584
|
return flattenTypeTo(type, function(definition) {
|
|
585
585
|
const {
|
|
@@ -600,7 +600,7 @@ function flattenValidatorsOfValidatingType(type) {
|
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
|
|
603
|
-
// transformers/flatteners/
|
|
603
|
+
// transformers/flatteners/flattenValuesOfType.ts
|
|
604
604
|
function mapper(_t, v) {
|
|
605
605
|
return v;
|
|
606
606
|
}
|
|
@@ -615,7 +615,7 @@ function flattenValuesOfType(typeDef, value, listIndicesToKeys) {
|
|
|
615
615
|
);
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
// transformers/flatteners/
|
|
618
|
+
// transformers/flatteners/valuePathToTypePath.ts
|
|
619
619
|
import {
|
|
620
620
|
assertEqual as assertEqual2,
|
|
621
621
|
assertExists,
|
|
@@ -767,7 +767,7 @@ function internalJsonValuePathToTypePath(typeDef, qualifiers, valueSteps, allowM
|
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
|
|
770
|
-
// validation/validators/
|
|
770
|
+
// validation/validators/CompositeValidator.ts
|
|
771
771
|
var CompositeValidator = class {
|
|
772
772
|
constructor(...validators) {
|
|
773
773
|
__publicField(this, "validators");
|
|
@@ -835,7 +835,7 @@ function mergeAnnotations(a1, a2) {
|
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
837
|
|
|
838
|
-
// types/
|
|
838
|
+
// types/typeOfType.ts
|
|
839
839
|
import {
|
|
840
840
|
map as map2,
|
|
841
841
|
UnreachableError as UnreachableError7
|
|
@@ -1119,7 +1119,7 @@ function union(discriminator) {
|
|
|
1119
1119
|
);
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
// validation/validators/
|
|
1122
|
+
// validation/validators/DefinedValidator.ts
|
|
1123
1123
|
var DefinedValidator = class {
|
|
1124
1124
|
constructor(error) {
|
|
1125
1125
|
this.error = error;
|
|
@@ -1138,7 +1138,7 @@ var DefinedValidator = class {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
};
|
|
1140
1140
|
|
|
1141
|
-
// validation/validators/
|
|
1141
|
+
// validation/validators/MaximumStringLengthValidator.ts
|
|
1142
1142
|
var MaximumStringLengthValidationErrorType = "maximum_string_length";
|
|
1143
1143
|
var MaximumStringLengthValidator = class {
|
|
1144
1144
|
constructor(maximumLength) {
|
|
@@ -1162,7 +1162,7 @@ var MaximumStringLengthValidator = class {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
};
|
|
1164
1164
|
|
|
1165
|
-
// validation/validators/
|
|
1165
|
+
// validation/validators/MinimumStringLengthValidator.ts
|
|
1166
1166
|
var MinimumStringLengthValidationErrorType = "minimum_string_length";
|
|
1167
1167
|
var MinimumStringLengthValidator = class {
|
|
1168
1168
|
constructor(minimumLength) {
|
|
@@ -1186,7 +1186,7 @@ var MinimumStringLengthValidator = class {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
};
|
|
1188
1188
|
|
|
1189
|
-
// validation/validators/
|
|
1189
|
+
// validation/validators/OptionalValidatorProxy.ts
|
|
1190
1190
|
var OptionalValidatorProxy = class _OptionalValidatorProxy {
|
|
1191
1191
|
constructor(proxied, isRequired) {
|
|
1192
1192
|
this.proxied = proxied;
|
|
@@ -1211,7 +1211,7 @@ var OptionalValidatorProxy = class _OptionalValidatorProxy {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
};
|
|
1213
1213
|
|
|
1214
|
-
// validation/validators/
|
|
1214
|
+
// validation/validators/RegexpValidator.ts
|
|
1215
1215
|
var RegexpValidationErrorType = "regexp";
|
|
1216
1216
|
var _RegexpValidator = class _RegexpValidator {
|
|
1217
1217
|
constructor(regexp, intent, {
|
package/index.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export * from './transformers/copies/copy'
|
|
2
|
-
export * from './transformers/copies/
|
|
2
|
+
export * from './transformers/copies/mobxCopy'
|
|
3
3
|
export * from './transformers/equals'
|
|
4
|
-
export * from './transformers/flatteners/
|
|
5
|
-
export * from './transformers/flatteners/
|
|
6
|
-
export * from './transformers/flatteners/
|
|
7
|
-
export * from './transformers/flatteners/
|
|
8
|
-
export * from './transformers/flatteners/
|
|
9
|
-
export * from './transformers/flatteners/
|
|
10
|
-
export * from './transformers/flatteners/
|
|
11
|
-
export * from './transformers/flatteners/
|
|
4
|
+
export * from './transformers/flatteners/flattenAccessorsOfType'
|
|
5
|
+
export * from './transformers/flatteners/flattenJsonValueToTypePathsOf'
|
|
6
|
+
export * from './transformers/flatteners/flattenTypesOfType'
|
|
7
|
+
export * from './transformers/flatteners/flattenValidatorsOfValidatingType'
|
|
8
|
+
export * from './transformers/flatteners/flattenValuesOfType'
|
|
9
|
+
export * from './transformers/flatteners/flattenValueTo'
|
|
10
|
+
export * from './transformers/flatteners/jsonPath'
|
|
11
|
+
export * from './transformers/flatteners/valuePathToTypePath'
|
|
12
12
|
export * from './types/builders'
|
|
13
|
-
export * from './types/
|
|
14
|
-
export * from './types/
|
|
15
|
-
export * from './types/
|
|
16
|
-
export * from './types/
|
|
17
|
-
export * from './types/
|
|
18
|
-
export * from './types/
|
|
19
|
-
export * from './types/
|
|
20
|
-
export * from './types/
|
|
21
|
-
export * from './types/
|
|
22
|
-
export * from './types/
|
|
23
|
-
export * from './types/
|
|
13
|
+
export * from './types/FlattenedAccessorsOfType'
|
|
14
|
+
export * from './types/FlattenedTypesOfType'
|
|
15
|
+
export * from './types/FlattenedValuesOfType'
|
|
16
|
+
export * from './types/MobxValueOfType'
|
|
17
|
+
export * from './types/PathsOfType'
|
|
18
|
+
export * from './types/ReadonlyTypeOfType'
|
|
19
|
+
export * from './types/StrictType'
|
|
20
|
+
export * from './types/Type'
|
|
21
|
+
export * from './types/ValueOfType'
|
|
22
|
+
export * from './types/ValueToTypePathsOfType'
|
|
23
|
+
export * from './types/ValueTypesOfDiscriminatedUnion'
|
|
24
24
|
export * from './validation/validator'
|
|
25
|
-
export * from './validation/validators/
|
|
26
|
-
export * from './validation/validators/
|
|
27
|
-
export * from './validation/validators/
|
|
28
|
-
export * from './validation/validators/
|
|
29
|
-
export * from './validation/validators/
|
|
30
|
-
export * from './validation/
|
|
25
|
+
export * from './validation/validators/DefinedValidator'
|
|
26
|
+
export * from './validation/validators/MaximumStringLengthValidator'
|
|
27
|
+
export * from './validation/validators/MinimumStringLengthValidator'
|
|
28
|
+
export * from './validation/validators/OptionalValidatorProxy'
|
|
29
|
+
export * from './validation/validators/RegexpValidator'
|
|
30
|
+
export * from './validation/ValidatorsOfValues'
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ReadonlyTypeOfType } from 'types/
|
|
2
|
-
import { type StrictType } from 'types/
|
|
3
|
-
import { type ValueOfType } from 'types/
|
|
1
|
+
import { type ReadonlyTypeOfType } from 'types/ReadonlyTypeOfType'
|
|
2
|
+
import { type StrictType } from 'types/StrictType'
|
|
3
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
4
4
|
import {
|
|
5
5
|
type AnyValueType,
|
|
6
6
|
copyTo,
|
|
7
|
-
} from './
|
|
7
|
+
} from './copyTo'
|
|
8
8
|
|
|
9
9
|
function identity(v: AnyValueType): AnyValueType {
|
|
10
10
|
return v
|
|
@@ -4,13 +4,7 @@ import {
|
|
|
4
4
|
UnexpectedImplementationError,
|
|
5
5
|
UnreachableError,
|
|
6
6
|
} from '@strictly/base'
|
|
7
|
-
import {
|
|
8
|
-
type ObjectFieldKey,
|
|
9
|
-
type TypeDef,
|
|
10
|
-
TypeDefType,
|
|
11
|
-
type UnionKey,
|
|
12
|
-
} from 'types/definitions'
|
|
13
|
-
import { type ReadonlyTypeOfType } from 'types/readonly_type_of_type'
|
|
7
|
+
import { type ReadonlyTypeOfType } from 'types/ReadonlyTypeOfType'
|
|
14
8
|
import {
|
|
15
9
|
type StrictListTypeDef,
|
|
16
10
|
type StrictLiteralTypeDef,
|
|
@@ -20,8 +14,14 @@ import {
|
|
|
20
14
|
type StrictType,
|
|
21
15
|
type StrictTypeDef,
|
|
22
16
|
type StrictUnionTypeDef,
|
|
23
|
-
} from 'types/
|
|
24
|
-
import {
|
|
17
|
+
} from 'types/StrictType'
|
|
18
|
+
import {
|
|
19
|
+
type ObjectFieldKey,
|
|
20
|
+
type TypeDef,
|
|
21
|
+
TypeDefType,
|
|
22
|
+
type UnionKey,
|
|
23
|
+
} from 'types/Type'
|
|
24
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
25
25
|
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
27
|
export type AnyValueType = any
|
|
@@ -7,22 +7,22 @@ import {
|
|
|
7
7
|
makeObservable,
|
|
8
8
|
observable,
|
|
9
9
|
} from 'mobx'
|
|
10
|
-
import { getUnionTypeDef } from 'transformers/flatteners/
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
TypeDefType,
|
|
14
|
-
} from 'types/definitions'
|
|
15
|
-
import { type MobxValueOfType } from 'types/mobx_value_of_type'
|
|
16
|
-
import { type ReadonlyTypeOfType } from 'types/readonly_type_of_type'
|
|
10
|
+
import { getUnionTypeDef } from 'transformers/flatteners/flattenValueTo'
|
|
11
|
+
import { type MobxValueOfType } from 'types/MobxValueOfType'
|
|
12
|
+
import { type ReadonlyTypeOfType } from 'types/ReadonlyTypeOfType'
|
|
17
13
|
import {
|
|
18
14
|
type StrictType,
|
|
19
15
|
type StrictTypeDef,
|
|
20
|
-
} from 'types/
|
|
21
|
-
import {
|
|
16
|
+
} from 'types/StrictType'
|
|
17
|
+
import {
|
|
18
|
+
type ObjectFieldKey,
|
|
19
|
+
TypeDefType,
|
|
20
|
+
} from 'types/Type'
|
|
21
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
22
22
|
import {
|
|
23
23
|
type AnyValueType,
|
|
24
24
|
copyTo,
|
|
25
|
-
} from './
|
|
25
|
+
} from './copyTo'
|
|
26
26
|
|
|
27
27
|
function observeValue(
|
|
28
28
|
v: AnyValueType,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type AnyValueType,
|
|
3
3
|
copyTo,
|
|
4
|
-
} from 'transformers/copies/
|
|
4
|
+
} from 'transformers/copies/copyTo'
|
|
5
5
|
import {
|
|
6
6
|
booleanType,
|
|
7
7
|
list,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
stringType,
|
|
13
13
|
union,
|
|
14
14
|
} from 'types/builders'
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { type StrictTypeDef } from 'types/StrictType'
|
|
16
|
+
import { TypeDefType } from 'types/Type'
|
|
17
17
|
|
|
18
18
|
describe('copyTo', function () {
|
|
19
19
|
function toString(v: AnyValueType, t: StrictTypeDef) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { mobxCopy } from 'transformers/copies/
|
|
1
|
+
import { mobxCopy } from 'transformers/copies/mobxCopy'
|
|
2
2
|
import {
|
|
3
3
|
numberType,
|
|
4
4
|
object,
|
|
5
5
|
} from 'types/builders'
|
|
6
|
-
import { type ValueOfType } from 'types/
|
|
6
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
7
7
|
|
|
8
8
|
describe('mobxCopy', function () {
|
|
9
9
|
describe('object', function () {
|
package/transformers/equals.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
type TypeDef,
|
|
10
10
|
TypeDefType,
|
|
11
11
|
type UnionTypeDef,
|
|
12
|
-
} from 'types/
|
|
13
|
-
import { type ValueOfType } from 'types/
|
|
12
|
+
} from 'types/Type'
|
|
13
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
14
14
|
|
|
15
15
|
export function equals<T extends Type>({ definition }: T, o1: ValueOfType<T>, o2: ValueOfType<T>): boolean {
|
|
16
16
|
return internalEquals(definition, o1, o2)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Type,
|
|
3
|
-
type TypeDef,
|
|
4
|
-
} from 'types/definitions'
|
|
5
1
|
import {
|
|
6
2
|
type Accessor,
|
|
7
3
|
type FlattenedAccessorsOfType,
|
|
8
|
-
} from 'types/
|
|
9
|
-
import {
|
|
4
|
+
} from 'types/FlattenedAccessorsOfType'
|
|
5
|
+
import {
|
|
6
|
+
type Type,
|
|
7
|
+
type TypeDef,
|
|
8
|
+
} from 'types/Type'
|
|
9
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
10
10
|
import {
|
|
11
11
|
type AnyValueType,
|
|
12
12
|
flattenValueTo,
|
|
13
13
|
type Setter,
|
|
14
|
-
} from './
|
|
14
|
+
} from './flattenValueTo'
|
|
15
15
|
|
|
16
16
|
function mapAccessor(
|
|
17
17
|
_t: TypeDef,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type Type,
|
|
3
3
|
type TypeDef,
|
|
4
|
-
} from 'types/
|
|
5
|
-
import { type ValueOfType } from 'types/
|
|
4
|
+
} from 'types/Type'
|
|
5
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
6
6
|
import {
|
|
7
7
|
type AnyValueType,
|
|
8
8
|
flattenValueTo,
|
|
9
9
|
type Setter,
|
|
10
|
-
} from './
|
|
10
|
+
} from './flattenValueTo'
|
|
11
11
|
|
|
12
12
|
function mapTypePaths(
|
|
13
13
|
_t: TypeDef,
|
|
@@ -2,9 +2,6 @@ import {
|
|
|
2
2
|
reduce,
|
|
3
3
|
UnreachableError,
|
|
4
4
|
} from '@strictly/base'
|
|
5
|
-
import {
|
|
6
|
-
TypeDefType,
|
|
7
|
-
} from 'types/definitions'
|
|
8
5
|
import {
|
|
9
6
|
type StrictListTypeDef,
|
|
10
7
|
type StrictObjectTypeDef,
|
|
@@ -12,8 +9,9 @@ import {
|
|
|
12
9
|
type StrictType,
|
|
13
10
|
type StrictTypeDef,
|
|
14
11
|
type StrictUnionTypeDef,
|
|
15
|
-
} from 'types/
|
|
16
|
-
import {
|
|
12
|
+
} from 'types/StrictType'
|
|
13
|
+
import { TypeDefType } from 'types/Type'
|
|
14
|
+
import { jsonPath } from './jsonPath'
|
|
17
15
|
|
|
18
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
17
|
export type AnyValueType = any
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { type StrictType } from 'types/StrictType'
|
|
1
2
|
import {
|
|
2
3
|
type Type,
|
|
3
4
|
type TypeDef,
|
|
4
|
-
} from 'types/
|
|
5
|
-
import {
|
|
6
|
-
import { flattenTypeTo } from './flatten_type_to'
|
|
5
|
+
} from 'types/Type'
|
|
6
|
+
import { flattenTypeTo } from './flattenTypeTo'
|
|
7
7
|
|
|
8
8
|
export function flattenTypesOfType<T extends StrictType>(t: T) {
|
|
9
9
|
// Type should be FlattenedTypeDefsOf<T>, but infinite depth error
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { type AnyValueType } from 'transformers/copies/
|
|
1
|
+
import { type AnyValueType } from 'transformers/copies/copyTo'
|
|
2
2
|
import {
|
|
3
3
|
flattenValueTo,
|
|
4
4
|
type Setter,
|
|
5
|
-
} from 'transformers/flatteners/
|
|
5
|
+
} from 'transformers/flatteners/flattenValueTo'
|
|
6
6
|
import {
|
|
7
7
|
type ReadonlyDeep,
|
|
8
8
|
type ValueOf,
|
|
9
9
|
} from 'type-fest'
|
|
10
|
-
import { type
|
|
11
|
-
import { type
|
|
12
|
-
import { type
|
|
13
|
-
import { type
|
|
14
|
-
import { type
|
|
15
|
-
import { type ValueOfType } from 'types/
|
|
10
|
+
import { type FlattenedTypesOfType } from 'types/FlattenedTypesOfType'
|
|
11
|
+
import { type FlattenedValuesOfType } from 'types/FlattenedValuesOfType'
|
|
12
|
+
import { type ReadonlyTypeOfType } from 'types/ReadonlyTypeOfType'
|
|
13
|
+
import { type StrictTypeDef } from 'types/StrictType'
|
|
14
|
+
import { type Type } from 'types/Type'
|
|
15
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
16
16
|
import {
|
|
17
17
|
validate,
|
|
18
18
|
type Validator,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type FlattenedTypesOfValidatingType } from 'types/
|
|
2
|
-
import { type FlattenedValidatorsOfValidatingType } from 'types/
|
|
1
|
+
import { type FlattenedTypesOfValidatingType } from 'types/FlattenedTypesOfValidatingType'
|
|
2
|
+
import { type FlattenedValidatorsOfValidatingType } from 'types/FlattenedValidatorsOfValidatingType'
|
|
3
3
|
import {
|
|
4
4
|
type ValidatingType,
|
|
5
5
|
type ValidatingTypeDef,
|
|
6
|
-
} from 'types/
|
|
6
|
+
} from 'types/ValidatingType'
|
|
7
7
|
import { type Validator } from 'validation/validator'
|
|
8
|
-
import { flattenTypeTo } from './
|
|
8
|
+
import { flattenTypeTo } from './flattenTypeTo'
|
|
9
9
|
|
|
10
10
|
export function flattenValidatorsOfValidatingType<
|
|
11
11
|
T extends ValidatingType,
|
|
@@ -2,12 +2,7 @@ import {
|
|
|
2
2
|
reduce,
|
|
3
3
|
UnreachableError,
|
|
4
4
|
} from '@strictly/base'
|
|
5
|
-
import {
|
|
6
|
-
type TypeDef,
|
|
7
|
-
TypeDefType,
|
|
8
|
-
type UnionTypeDef,
|
|
9
|
-
} from 'types/definitions'
|
|
10
|
-
import { type ReadonlyTypeOfType } from 'types/readonly_type_of_type'
|
|
5
|
+
import { type ReadonlyTypeOfType } from 'types/ReadonlyTypeOfType'
|
|
11
6
|
import {
|
|
12
7
|
type StrictListTypeDef,
|
|
13
8
|
type StrictObjectTypeDef,
|
|
@@ -15,9 +10,14 @@ import {
|
|
|
15
10
|
type StrictType,
|
|
16
11
|
type StrictTypeDef,
|
|
17
12
|
type StrictUnionTypeDef,
|
|
18
|
-
} from 'types/
|
|
19
|
-
import {
|
|
20
|
-
|
|
13
|
+
} from 'types/StrictType'
|
|
14
|
+
import {
|
|
15
|
+
type TypeDef,
|
|
16
|
+
TypeDefType,
|
|
17
|
+
type UnionTypeDef,
|
|
18
|
+
} from 'types/Type'
|
|
19
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
20
|
+
import { jsonPath } from './jsonPath'
|
|
21
21
|
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
23
|
export type AnyValueType = any
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
import { type ValueOfType } from 'types/
|
|
1
|
+
import { type StrictTypeDef } from 'types/StrictType'
|
|
2
|
+
import { type Type } from 'types/Type'
|
|
3
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
4
4
|
import {
|
|
5
5
|
type AnyValueType,
|
|
6
6
|
flattenValueTo,
|
|
7
|
-
} from './
|
|
7
|
+
} from './flattenValueTo'
|
|
8
8
|
|
|
9
9
|
function mapper(_t: StrictTypeDef, v: AnyValueType) {
|
|
10
10
|
return v
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { expectDefinedAndReturn } from '@strictly/base'
|
|
2
|
-
import { flattenAccessorsOfType } from 'transformers/flatteners/
|
|
2
|
+
import { flattenAccessorsOfType } from 'transformers/flatteners/flattenAccessorsOfType'
|
|
3
3
|
import {
|
|
4
4
|
booleanType,
|
|
5
5
|
list,
|
|
6
6
|
numberType,
|
|
7
7
|
object,
|
|
8
8
|
} from 'types/builders'
|
|
9
|
-
import { type FlattenedAccessorsOfType } from 'types/
|
|
10
|
-
import { type ValueOfType } from 'types/
|
|
9
|
+
import { type FlattenedAccessorsOfType } from 'types/FlattenedAccessorsOfType'
|
|
10
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
11
11
|
import {
|
|
12
12
|
type Mock,
|
|
13
13
|
vi,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { flattenTypeTo } from 'transformers/flatteners/
|
|
1
|
+
import { flattenTypeTo } from 'transformers/flatteners/flattenTypeTo'
|
|
2
2
|
import {
|
|
3
3
|
booleanType,
|
|
4
4
|
list,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
type TypeDef,
|
|
13
13
|
TypeDefType,
|
|
14
|
-
} from 'types/
|
|
14
|
+
} from 'types/Type'
|
|
15
15
|
import {
|
|
16
16
|
type Mock,
|
|
17
17
|
vi,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { flattenValidationErrorsOfType } from 'transformers/flatteners/
|
|
1
|
+
import { flattenValidationErrorsOfType } from 'transformers/flatteners/flattenValidationErrorsOfType'
|
|
2
2
|
import { literal } from 'types/builders'
|
|
3
|
-
import { type ValueToTypePathsOfType } from 'types/
|
|
3
|
+
import { type ValueToTypePathsOfType } from 'types/ValueToTypePathsOfType'
|
|
4
4
|
|
|
5
5
|
describe('flattenValidationsOfType', function () {
|
|
6
6
|
describe('literal', function () {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
flattenValueTo,
|
|
4
4
|
type Mapper,
|
|
5
5
|
type Setter,
|
|
6
|
-
} from 'transformers/flatteners/
|
|
6
|
+
} from 'transformers/flatteners/flattenValueTo'
|
|
7
7
|
import { type SimplifyDeep } from 'type-fest'
|
|
8
8
|
import {
|
|
9
9
|
booleanType,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
record,
|
|
16
16
|
union,
|
|
17
17
|
} from 'types/builders'
|
|
18
|
+
import { type FlattenedTypesOfType } from 'types/FlattenedTypesOfType'
|
|
18
19
|
import {
|
|
19
20
|
type Type,
|
|
20
21
|
type TypeDef,
|
|
21
|
-
} from 'types/
|
|
22
|
-
import { type
|
|
23
|
-
import { type ValueOfType } from 'types/value_of_type'
|
|
22
|
+
} from 'types/Type'
|
|
23
|
+
import { type ValueOfType } from 'types/ValueOfType'
|
|
24
24
|
import {
|
|
25
25
|
type Mock,
|
|
26
26
|
vi,
|