import type { CheckActualValueCheckMode, CheckFunction, CheckMode, CompareWithDescriptorAnyValueCheckMode, CompareWithDescriptorStringValueCheckMode, CompareWithDescriptorValueCheckMode, EntityDescriptor } from './checkModes'; import type { NestedObjectOrArray } from './utils'; type PlainEntityPrimitiveValue = boolean | number | string | null; type PlainEntityObjectiveValue = NestedObjectOrArray; export type EntityFunctionDescriptorValue = (actualValue: ActualValue, checkFunction: CheckFunction) => boolean; export type TopLevelPlainEntityDescriptor = Check extends 'function' ? EntityDescriptor> : Check extends CompareWithDescriptorAnyValueCheckMode ? EntityDescriptor : Check extends CheckActualValueCheckMode ? EntityDescriptor : never; type PropertyLevelPlainEntityDescriptor = Check extends 'function' ? EntityDescriptor> : Check extends 'regExp' ? EntityDescriptor : Check extends CompareWithDescriptorAnyValueCheckMode ? EntityDescriptor : Check extends CompareWithDescriptorStringValueCheckMode ? EntityDescriptor : Check extends CheckActualValueCheckMode ? EntityDescriptor : never; type NonCheckMode = T & { checkMode?: never; }; type TopLevelPlainEntityRecord = NonCheckMode | PlainEntityPrimitiveValue | PropertyLevelPlainEntityDescriptor>>; export type TopLevelPlainEntityArray = Array; export type BodyPlainEntity = TopLevelPlainEntityArray | TopLevelPlainEntityDescriptor | TopLevelPlainEntityRecord; export type VariablesPlainEntity = TopLevelPlainEntityDescriptor | TopLevelPlainEntityRecord; type MappedEntityValue = boolean | number | string; type MappedEntityDescriptor = Check extends 'function' ? EntityDescriptor> : Check extends 'regExp' ? EntityDescriptor : Check extends CompareWithDescriptorValueCheckMode ? EntityDescriptor : Check extends CheckActualValueCheckMode ? EntityDescriptor : never; export type MappedEntity = Record; export {};