@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type FlattenedValuesOfType } from './FlattenedValuesOfType';
|
|
2
|
+
import { type Type } from './Type';
|
|
3
3
|
export type Accessor<T = any> = {
|
|
4
4
|
readonly value: T;
|
|
5
5
|
set(v: T): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UnionToIntersection } from 'type-fest';
|
|
2
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './definitions';
|
|
3
2
|
import { type Depths, type StartingDepth } from './flattened';
|
|
4
|
-
import { type PathOf } from './
|
|
3
|
+
import { type PathOf } from './PathOf';
|
|
4
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './Type';
|
|
5
5
|
export type FlattenedTypesOfType<T extends Type, SegmentOverride extends string | null, Path extends string = '$', Depth extends number = StartingDepth> = InternalFlattenedTypeDefsOf<T['definition'], SegmentOverride, Path, Depth>;
|
|
6
6
|
type InternalFlattenedTypeDefsOf<T extends TypeDef, SegmentOverride extends string | null, Path extends string, Depth extends number> = {
|
|
7
7
|
readonly [K in Path]: Type<T>;
|
package/.out/types/{flattened_types_of_validating_type.d.ts → FlattenedTypesOfValidatingType.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type UnionToIntersection } from 'type-fest';
|
|
2
|
-
import { type Type, type TypeDef } from './definitions';
|
|
3
2
|
import { type Depths, type StartingDepth } from './flattened';
|
|
4
|
-
import { type PathOf } from './
|
|
5
|
-
import { type
|
|
3
|
+
import { type PathOf } from './PathOf';
|
|
4
|
+
import { type Type, type TypeDef } from './Type';
|
|
5
|
+
import { type ContextOfValidatingTypeDef, type ErrorOfValidatingTypeDef, type ValidatingListTypeDef, type ValidatingLiteralTypeDef, type ValidatingObjectTypeDef, type ValidatingRecordTypeDef, type ValidatingUnionTypeDef } from './ValidatingType';
|
|
6
6
|
export type FlattenedTypesOfValidatingType<T extends Type, SegmentOverride extends string | null, Path extends string = '$', Depth extends number = StartingDepth> = InternalFlattenedTypeDefsOf<T['definition'], SegmentOverride, Path, Depth>;
|
|
7
7
|
type InternalFlattenedTypeDefsOf<T extends TypeDef, SegmentOverride extends string | null, Path extends string, Depth extends number> = {
|
|
8
8
|
readonly [K in Path]: Type<T>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Simplify } from 'type-fest';
|
|
2
2
|
import { type Validator } from 'validation/validator';
|
|
3
|
-
import { type FlattenedTypesOfType } from './
|
|
4
|
-
import { type ReadonlyOfTypeDef } from './
|
|
5
|
-
import { type ErrorOfValidatingTypeDef, type ValidatingType, type ValidatingTypeDef } from './
|
|
6
|
-
import { type ValueOfTypeDef } from './
|
|
3
|
+
import { type FlattenedTypesOfType } from './FlattenedTypesOfType';
|
|
4
|
+
import { type ReadonlyOfTypeDef } from './ReadonlyTypeOfType';
|
|
5
|
+
import { type ErrorOfValidatingTypeDef, type ValidatingType, type ValidatingTypeDef } from './ValidatingType';
|
|
6
|
+
import { type ValueOfTypeDef } from './ValueOfType';
|
|
7
7
|
type ValidatorOfValidatingType<T extends ValidatingTypeDef, ValuePath extends string> = T extends ValidatingTypeDef<infer E, infer C> ? Validator<ValueOfTypeDef<ReadonlyOfTypeDef<T>>, E, ValuePath, C> : never;
|
|
8
8
|
export type FlattenedValidatorsOfValidatingType<T extends ValidatingType, TypePathsToValuePaths extends Readonly<Record<keyof FlattenedTypes, string>>, FlattenedTypes extends Readonly<Record<string, ValidatingType>> = FlattenedTypesOfType<T, '*'>> = Simplify<{
|
|
9
9
|
[K in keyof FlattenedTypes as ErrorOfValidatingTypeDef<FlattenedTypes[K]['definition']> extends never ? never : K]: ValidatorOfValidatingType<FlattenedTypes[K]['definition'], TypePathsToValuePaths[K]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
import { type ValueOfType } from './
|
|
1
|
+
import { type FlattenedTypesOfType } from './FlattenedTypesOfType';
|
|
2
|
+
import { type Type } from './Type';
|
|
3
|
+
import { type ValueOfType } from './ValueOfType';
|
|
4
4
|
export type FlattenedValuesOfType<T extends Type, SegmentOverride extends string | null = null, Flattened extends Readonly<Record<string, Type>> = FlattenedTypesOfType<T, SegmentOverride>> = {
|
|
5
5
|
[K in keyof Flattened]: ValueOfType<Flattened[K], {}>;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Type } from './
|
|
2
|
-
import { type ValueOfType } from './
|
|
1
|
+
import { type Type } from './Type';
|
|
2
|
+
import { type ValueOfType } from './ValueOfType';
|
|
3
3
|
declare const MOBX_OBSERVABLE_KEY = "___mobx_observable";
|
|
4
4
|
export type MobxObservable<T = {}> = {
|
|
5
5
|
[MOBX_OBSERVABLE_KEY]: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type TypeDefType, type UnionTypeDef } from './
|
|
1
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type TypeDefType, type UnionTypeDef } from './Type';
|
|
2
2
|
export type PartialTypeOfType<T extends Type> = {
|
|
3
3
|
readonly typeDef: InternalPartialAndNullableOf<T['definition']>;
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './definitions';
|
|
2
1
|
import { type Depths, type StartingDepth } from './flattened';
|
|
3
|
-
import { type PathOf } from './
|
|
2
|
+
import { type PathOf } from './PathOf';
|
|
3
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './Type';
|
|
4
4
|
export type PathsOfType<T extends Type, SegmentOverride extends string | null = null, Prefix extends string = '$'> = InternalJsonPathsOf<T['definition'], Prefix, SegmentOverride, StartingDepth>;
|
|
5
5
|
export type InternalJsonPathsOf<F extends TypeDef, Prefix extends string, SegmentOverride extends string | null, Depth extends number, NextDepth extends number = Depths[Depth]> = InternalJsonPathsOfChildren<F, Prefix, SegmentOverride, NextDepth> | Prefix;
|
|
6
6
|
type InternalJsonPathsOfChildren<F extends TypeDef, Prefix extends string, SegmentOverride extends string | null, Depth extends number> = Depth extends -1 ? never : F extends LiteralTypeDef ? InternalJsonPathsOfLiteralChildren : F extends ListTypeDef ? InternalJsonPathsOfListChildren<F, Prefix, SegmentOverride, Depth> : F extends RecordTypeDef ? InternalJsonPathsOfRecordChildren<F, Prefix, SegmentOverride, Depth> : F extends ObjectTypeDef ? InternalJsonPathsOfObjectChildren<F, Prefix, SegmentOverride, Depth> : F extends UnionTypeDef ? InternalJsonPathsOfUnionChildren<F, Prefix, SegmentOverride, Depth> : never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './
|
|
1
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './Type';
|
|
2
2
|
export type ReadonlyTypeOfType<T extends Type> = {
|
|
3
3
|
readonly definition: ReadonlyOfTypeDef<T['definition']>;
|
|
4
4
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IsEqual, type Simplify } from 'type-fest';
|
|
2
|
-
import { type ObjectFieldKey, type RecordKeyType, type TypeDefType, type UnionKey } from './
|
|
2
|
+
import { type ObjectFieldKey, type RecordKeyType, type TypeDefType, type UnionKey } from './Type';
|
|
3
3
|
export type StrictType<T extends StrictTypeDef = StrictTypeDef> = {
|
|
4
4
|
readonly definition: T;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FunctionalValidator } from 'validation/validator';
|
|
2
|
-
import { type ObjectFieldKey, type RecordKeyType, type TypeDefType, type UnionKey } from './
|
|
2
|
+
import { type ObjectFieldKey, type RecordKeyType, type TypeDefType, type UnionKey } from './Type';
|
|
3
3
|
export type ValidatingType<T extends ValidatingTypeDef = ValidatingTypeDef> = {
|
|
4
4
|
readonly definition: T;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IsFieldReadonly } from '@strictly/base';
|
|
2
|
-
import { type TypeDefType } from '
|
|
3
|
-
import { type Rule, type ValidatingListTypeDef, type ValidatingLiteralTypeDef, type ValidatingObjectTypeDef, type ValidatingRecordTypeDef, type ValidatingTypeDef, type ValidatingUnionTypeDef } from './
|
|
2
|
+
import { type TypeDefType } from './Type';
|
|
3
|
+
import { type Rule, type ValidatingListTypeDef, type ValidatingLiteralTypeDef, type ValidatingObjectTypeDef, type ValidatingRecordTypeDef, type ValidatingTypeDef, type ValidatingUnionTypeDef } from './ValidatingType';
|
|
4
4
|
export type ValidatingTypeDefWithError<T extends ValidatingTypeDef, E, C> = T extends ValidatingLiteralTypeDef ? ValidatingLiteralTypeDefWithError<T, E, C> : T extends ValidatingListTypeDef ? ValidatingListTypeDefWithError<T, E, C> : T extends ValidatingRecordTypeDef ? ValidatingRecordTypeDefWithError<T, E, C> : T extends ValidatingObjectTypeDef ? ValidatingObjectTypeDefWithError<T, E, C> : T extends ValidatingUnionTypeDef ? ValidatingUnionTypeDefWithError<T, E, C> : never;
|
|
5
5
|
type ValidatingLiteralTypeDefWithError<T extends ValidatingLiteralTypeDef, E2, C2> = T extends ValidatingLiteralTypeDef<infer E1, infer C1, infer V> ? {
|
|
6
6
|
readonly type: TypeDefType.Literal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IsFieldReadonly } from '@strictly/base';
|
|
2
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './
|
|
2
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, type UnionTypeDef } from './Type';
|
|
3
3
|
export type ValueOfType<T, Extra = {}> = T extends Type ? ValueOfTypeDef<T['definition'], Extra> : never;
|
|
4
4
|
export type ValueOfTypeDef<F extends TypeDef, Extra = {}> = F extends LiteralTypeDef ? ValueOfLiteralTypeDef<F> : F extends ListTypeDef ? ValueOfListTypeDef<F, Extra> : F extends RecordTypeDef ? ValueOfRecordTypeDef<F, Extra> : F extends ObjectTypeDef ? ValueOfObjectTypeDef<F, Extra> : F extends UnionTypeDef ? ValueOfUnionTypeDef<F, Extra> : never;
|
|
5
5
|
type ValueOfLiteralTypeDef<F extends LiteralTypeDef> = F['valuePrototype'][number];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SimplifyDeep, type UnionToIntersection } from 'type-fest';
|
|
2
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type TypeDef, type UnionTypeDef } from './definitions';
|
|
3
2
|
import { type Depths, type StartingDepth } from './flattened';
|
|
4
|
-
import { type PathOf } from './
|
|
5
|
-
import { type StrictType } from './
|
|
3
|
+
import { type PathOf } from './PathOf';
|
|
4
|
+
import { type StrictType } from './StrictType';
|
|
5
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectTypeDef, type RecordTypeDef, type TypeDef, type UnionTypeDef } from './Type';
|
|
6
6
|
export type ValueToTypePathsOfType<T extends StrictType, SegmentOverride extends string = '*', Path extends string = '$'> = SimplifyDeep<InternalFlattenedTypePathsOf<T['definition'], SegmentOverride, Path, Path, StartingDepth>>;
|
|
7
7
|
type InternalFlattenedTypePathsOf<T extends TypeDef, SegmentOverride extends string, ValuePath extends string, TypePath extends string, Depth extends number> = {
|
|
8
8
|
readonly [K in ValuePath]: TypePath;
|
package/.out/types/{value_types_of_discriminated_union.d.ts → ValueTypesOfDiscriminatedUnion.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
import { type ValueOfType } from './
|
|
1
|
+
import { type ReadonlyTypeOfType } from './ReadonlyTypeOfType';
|
|
2
|
+
import { type UnionTypeDef } from './Type';
|
|
3
|
+
import { type ValueOfType } from './ValueOfType';
|
|
4
4
|
export type ValueTypesOfDiscriminatedUnion<U extends UnionTypeDef> = U extends UnionTypeDef<infer D, infer Unions> ? D extends string ? {
|
|
5
5
|
[K in keyof Unions]: ValueOfType<ReadonlyTypeOfType<{
|
|
6
6
|
definition: Unions[K];
|
package/.out/types/builders.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type IsFieldReadonly } from '@strictly/base';
|
|
2
2
|
import { type Validator } from 'validation/validator';
|
|
3
|
-
import { type ObjectFieldKey, type RecordKeyType, type Type, type TypeDef, TypeDefType, type UnionKey } from './
|
|
4
|
-
import { type TypeOfType } from './
|
|
5
|
-
import { type Rule, type ValidatingListTypeDef, type ValidatingLiteralTypeDef, type ValidatingObjectTypeDef, type ValidatingRecordTypeDef, type ValidatingType, type ValidatingTypeDef, type ValidatingUnionTypeDef } from './
|
|
6
|
-
import { type ValidatingTypeDefWithError } from './
|
|
7
|
-
import { type ValueOfType, type ValueOfTypeDef } from './
|
|
3
|
+
import { type ObjectFieldKey, type RecordKeyType, type Type, type TypeDef, TypeDefType, type UnionKey } from './Type';
|
|
4
|
+
import { type TypeOfType } from './typeOfType';
|
|
5
|
+
import { type Rule, type ValidatingListTypeDef, type ValidatingLiteralTypeDef, type ValidatingObjectTypeDef, type ValidatingRecordTypeDef, type ValidatingType, type ValidatingTypeDef, type ValidatingUnionTypeDef } from './ValidatingType';
|
|
6
|
+
import { type ValidatingTypeDefWithError } from './ValidatingTypeDefWithError';
|
|
7
|
+
import { type ValueOfType, type ValueOfTypeDef } from './ValueOfType';
|
|
8
8
|
declare class TypeDefBuilder<T extends ValidatingTypeDef> implements ValidatingType<T> {
|
|
9
9
|
readonly definition: T;
|
|
10
10
|
constructor(definition: T);
|
package/.out/types/builders.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAnnotatedValidator, mergeAnnotations, validate, } from 'validation/validator';
|
|
2
|
-
import { TypeDefType, } from './
|
|
3
|
-
import { typeOfType, } from './
|
|
2
|
+
import { TypeDefType, } from './Type';
|
|
3
|
+
import { typeOfType, } from './typeOfType';
|
|
4
4
|
function emptyRule() {
|
|
5
5
|
return null;
|
|
6
6
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type StartingDepth =
|
|
1
|
+
export type StartingDepth = 7;
|
|
2
2
|
export type Depths = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { booleanType, list, nullable, numberType, object, record, stringType, union, } from 'types/builders';
|
|
2
|
-
import { TypeDefType, } from 'types/
|
|
2
|
+
import { TypeDefType, } from 'types/Type';
|
|
3
3
|
describe('builder', function () {
|
|
4
4
|
describe('literal', function () {
|
|
5
5
|
const { definition } = numberType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IsFieldReadonly } from '@strictly/base';
|
|
2
|
-
import { type ListTypeDef, type LiteralTypeDef, type ObjectFieldKey, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, TypeDefType, type UnionTypeDef } from '
|
|
2
|
+
import { type ListTypeDef, type LiteralTypeDef, type ObjectFieldKey, type ObjectTypeDef, type RecordTypeDef, type Type, type TypeDef, TypeDefType, type UnionTypeDef } from './Type';
|
|
3
3
|
export type TypeOfType<T extends Type> = T extends Type<infer D> ? {
|
|
4
4
|
readonly definition: TypeDefOfTypeDef<D>;
|
|
5
5
|
} : never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { map, UnreachableError, } from '@strictly/base';
|
|
2
|
-
import { TypeDefType, } from '
|
|
2
|
+
import { TypeDefType, } from './Type';
|
|
3
3
|
export function typeOfType({ definition }) {
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MinimumStringLengthValidationErrorType, MinimumStringLengthValidator, } from 'validation/validators/
|
|
1
|
+
import { MinimumStringLengthValidationErrorType, MinimumStringLengthValidator, } from 'validation/validators/MinimumStringLengthValidator';
|
|
2
2
|
describe('MinimumStringLengthValidator', () => {
|
|
3
3
|
describe('required', () => {
|
|
4
4
|
it.each([
|
package/.out/validation/validators/specs/{regexp_validator.tests.js → regexpValidator.tests.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RegexpValidationErrorType, RegexpValidator, } from 'validation/validators/
|
|
1
|
+
import { RegexpValidationErrorType, RegexpValidator, } from 'validation/validators/RegexpValidator';
|
|
2
2
|
describe('RegexpValidator', () => {
|
|
3
3
|
describe('phone', () => {
|
|
4
4
|
it.each([
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@ $ tsup
|
|
|
7
7
|
[34mCLI[39m Target: es6
|
|
8
8
|
[34mCJS[39m Build start
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m35.
|
|
11
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
-
[32mESM[39m [1mdist/index.js [22m[32m33.
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m35.88 KB[39m
|
|
11
|
+
[32mCJS[39m ⚡️ Build success in 88ms
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m33.29 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 89ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 7960ms
|
|
16
16
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m41.80 KB[39m
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m41.80 KB[39m
|
|
18
|
-
Done in
|
|
18
|
+
Done in 9.24s.
|
package/dist/index.cjs
CHANGED
|
@@ -81,10 +81,10 @@ __export(index_exports, {
|
|
|
81
81
|
});
|
|
82
82
|
module.exports = __toCommonJS(index_exports);
|
|
83
83
|
|
|
84
|
-
// transformers/copies/
|
|
84
|
+
// transformers/copies/copyTo.ts
|
|
85
85
|
var import_base = require("@strictly/base");
|
|
86
86
|
|
|
87
|
-
// types/
|
|
87
|
+
// types/Type.ts
|
|
88
88
|
var TypeDefType = /* @__PURE__ */ ((TypeDefType2) => {
|
|
89
89
|
TypeDefType2[TypeDefType2["Literal"] = 1] = "Literal";
|
|
90
90
|
TypeDefType2[TypeDefType2["List"] = 2] = "List";
|
|
@@ -94,7 +94,7 @@ var TypeDefType = /* @__PURE__ */ ((TypeDefType2) => {
|
|
|
94
94
|
return TypeDefType2;
|
|
95
95
|
})(TypeDefType || {});
|
|
96
96
|
|
|
97
|
-
// transformers/copies/
|
|
97
|
+
// transformers/copies/copyTo.ts
|
|
98
98
|
function copyTo({ definition }, value, copier) {
|
|
99
99
|
return internalCopyTo(
|
|
100
100
|
definition,
|
|
@@ -225,14 +225,14 @@ function copy(t, proto) {
|
|
|
225
225
|
return copyTo(t, proto, identity);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
// transformers/copies/
|
|
228
|
+
// transformers/copies/mobxCopy.ts
|
|
229
229
|
var import_base4 = require("@strictly/base");
|
|
230
230
|
var import_mobx = require("mobx");
|
|
231
231
|
|
|
232
|
-
// transformers/flatteners/
|
|
232
|
+
// transformers/flatteners/flattenValueTo.ts
|
|
233
233
|
var import_base3 = require("@strictly/base");
|
|
234
234
|
|
|
235
|
-
// transformers/flatteners/
|
|
235
|
+
// transformers/flatteners/jsonPath.ts
|
|
236
236
|
var import_base2 = require("@strictly/base");
|
|
237
237
|
function jsonPath(prefix, segment, qualifier) {
|
|
238
238
|
const s = `.${segment}`;
|
|
@@ -257,7 +257,7 @@ function jsonPathUnprefix(prefix, path) {
|
|
|
257
257
|
return `$${path.slice(prefix.length)}`;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
// transformers/flatteners/
|
|
260
|
+
// transformers/flatteners/flattenValueTo.ts
|
|
261
261
|
function flattenValueTo({ definition }, v, setter, mapper2, listIndicesToKeys = {}) {
|
|
262
262
|
const r = {};
|
|
263
263
|
internalFlattenValue(
|
|
@@ -398,7 +398,7 @@ function getUnionTypeDef(typeDef, v) {
|
|
|
398
398
|
return typeDef.unions[v[typeDef.discriminator]];
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
// transformers/copies/
|
|
401
|
+
// transformers/copies/mobxCopy.ts
|
|
402
402
|
function observeValue(v, def) {
|
|
403
403
|
if (v == null) {
|
|
404
404
|
return v;
|
|
@@ -506,7 +506,7 @@ function internalUnionEquals({
|
|
|
506
506
|
return o1 === o2 || variableTypeDefs.length === 1 && internalEquals(variableTypeDefs[0], o1, o2);
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
-
// transformers/flatteners/
|
|
509
|
+
// transformers/flatteners/flattenAccessorsOfType.ts
|
|
510
510
|
function mapAccessor(_t, value, set) {
|
|
511
511
|
return {
|
|
512
512
|
value,
|
|
@@ -523,7 +523,7 @@ function flattenAccessorsOfType(t, value, setValue, listIndicesToKeys) {
|
|
|
523
523
|
);
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
// transformers/flatteners/
|
|
526
|
+
// transformers/flatteners/flattenJsonValueToTypePathsOf.ts
|
|
527
527
|
function mapTypePaths(_t, _value, _set, typePath) {
|
|
528
528
|
return typePath;
|
|
529
529
|
}
|
|
@@ -538,7 +538,7 @@ function flattenJsonValueToTypePathsOf(t, value, listIndicesToKeys) {
|
|
|
538
538
|
);
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
-
// transformers/flatteners/
|
|
541
|
+
// transformers/flatteners/flattenTypeTo.ts
|
|
542
542
|
var import_base6 = require("@strictly/base");
|
|
543
543
|
function flattenTypeTo({ definition }, mapper2) {
|
|
544
544
|
const typeDefs = internalFlattenTypeDef("$", definition, {});
|
|
@@ -609,7 +609,7 @@ function internalFlattenUnionTypeDefChildren(path, qualifier, {
|
|
|
609
609
|
);
|
|
610
610
|
}
|
|
611
611
|
|
|
612
|
-
// transformers/flatteners/
|
|
612
|
+
// transformers/flatteners/flattenTypesOfType.ts
|
|
613
613
|
function flattenTypesOfType(t) {
|
|
614
614
|
return flattenTypeTo(
|
|
615
615
|
t,
|
|
@@ -619,7 +619,7 @@ function flattenTypesOfType(t) {
|
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
621
|
|
|
622
|
-
// transformers/flatteners/
|
|
622
|
+
// transformers/flatteners/flattenValidatorsOfValidatingType.ts
|
|
623
623
|
function flattenValidatorsOfValidatingType(type) {
|
|
624
624
|
return flattenTypeTo(type, function(definition) {
|
|
625
625
|
const {
|
|
@@ -640,7 +640,7 @@ function flattenValidatorsOfValidatingType(type) {
|
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
642
|
|
|
643
|
-
// transformers/flatteners/
|
|
643
|
+
// transformers/flatteners/flattenValuesOfType.ts
|
|
644
644
|
function mapper(_t, v) {
|
|
645
645
|
return v;
|
|
646
646
|
}
|
|
@@ -655,7 +655,7 @@ function flattenValuesOfType(typeDef, value, listIndicesToKeys) {
|
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
-
// transformers/flatteners/
|
|
658
|
+
// transformers/flatteners/valuePathToTypePath.ts
|
|
659
659
|
var import_base7 = require("@strictly/base");
|
|
660
660
|
function valuePathToTypePath({ definition: typeDef }, valuePath, allowMissingPaths = false) {
|
|
661
661
|
const valueSteps = valuePath.split(/\.|\[/g);
|
|
@@ -800,7 +800,7 @@ function internalJsonValuePathToTypePath(typeDef, qualifiers, valueSteps, allowM
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
// validation/validators/
|
|
803
|
+
// validation/validators/CompositeValidator.ts
|
|
804
804
|
var CompositeValidator = class {
|
|
805
805
|
constructor(...validators) {
|
|
806
806
|
__publicField(this, "validators");
|
|
@@ -868,7 +868,7 @@ function mergeAnnotations(a1, a2) {
|
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
// types/
|
|
871
|
+
// types/typeOfType.ts
|
|
872
872
|
var import_base8 = require("@strictly/base");
|
|
873
873
|
function typeOfType({ definition }) {
|
|
874
874
|
return {
|
|
@@ -1149,7 +1149,7 @@ function union(discriminator) {
|
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
// validation/validators/
|
|
1152
|
+
// validation/validators/DefinedValidator.ts
|
|
1153
1153
|
var DefinedValidator = class {
|
|
1154
1154
|
constructor(error) {
|
|
1155
1155
|
this.error = error;
|
|
@@ -1168,7 +1168,7 @@ var DefinedValidator = class {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
1170
|
|
|
1171
|
-
// validation/validators/
|
|
1171
|
+
// validation/validators/MaximumStringLengthValidator.ts
|
|
1172
1172
|
var MaximumStringLengthValidationErrorType = "maximum_string_length";
|
|
1173
1173
|
var MaximumStringLengthValidator = class {
|
|
1174
1174
|
constructor(maximumLength) {
|
|
@@ -1192,7 +1192,7 @@ var MaximumStringLengthValidator = class {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
};
|
|
1194
1194
|
|
|
1195
|
-
// validation/validators/
|
|
1195
|
+
// validation/validators/MinimumStringLengthValidator.ts
|
|
1196
1196
|
var MinimumStringLengthValidationErrorType = "minimum_string_length";
|
|
1197
1197
|
var MinimumStringLengthValidator = class {
|
|
1198
1198
|
constructor(minimumLength) {
|
|
@@ -1216,7 +1216,7 @@ var MinimumStringLengthValidator = class {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
};
|
|
1218
1218
|
|
|
1219
|
-
// validation/validators/
|
|
1219
|
+
// validation/validators/OptionalValidatorProxy.ts
|
|
1220
1220
|
var OptionalValidatorProxy = class _OptionalValidatorProxy {
|
|
1221
1221
|
constructor(proxied, isRequired) {
|
|
1222
1222
|
this.proxied = proxied;
|
|
@@ -1241,7 +1241,7 @@ var OptionalValidatorProxy = class _OptionalValidatorProxy {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
};
|
|
1243
1243
|
|
|
1244
|
-
// validation/validators/
|
|
1244
|
+
// validation/validators/RegexpValidator.ts
|
|
1245
1245
|
var RegexpValidationErrorType = "regexp";
|
|
1246
1246
|
var _RegexpValidator = class _RegexpValidator {
|
|
1247
1247
|
constructor(regexp, intent, {
|
package/dist/index.d.cts
CHANGED
|
@@ -149,7 +149,7 @@ declare function mobxCopy<T extends StrictType>(t: T, proto: ValueOfType<Readonl
|
|
|
149
149
|
|
|
150
150
|
declare function equals<T extends Type>({ definition }: T, o1: ValueOfType<T>, o2: ValueOfType<T>): boolean;
|
|
151
151
|
|
|
152
|
-
type StartingDepth =
|
|
152
|
+
type StartingDepth = 7;
|
|
153
153
|
type Depths = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
|
|
154
154
|
|
|
155
155
|
type PathOf<Prefix extends string, Accessor extends string | number | symbol, SegmentOverride extends string | null = null> = SegmentOverride extends string ? `${Prefix}.${SegmentOverride}` : Accessor extends string | number ? `${Prefix}.${Accessor}` : never;
|
package/dist/index.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ declare function mobxCopy<T extends StrictType>(t: T, proto: ValueOfType<Readonl
|
|
|
149
149
|
|
|
150
150
|
declare function equals<T extends Type>({ definition }: T, o1: ValueOfType<T>, o2: ValueOfType<T>): boolean;
|
|
151
151
|
|
|
152
|
-
type StartingDepth =
|
|
152
|
+
type StartingDepth = 7;
|
|
153
153
|
type Depths = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
|
|
154
154
|
|
|
155
155
|
type PathOf<Prefix extends string, Accessor extends string | number | symbol, SegmentOverride extends string | null = null> = SegmentOverride extends string ? `${Prefix}.${SegmentOverride}` : Accessor extends string | number ? `${Prefix}.${Accessor}` : never;
|