import { type MapDescriptorAssertionOptions } from './assert'; /** * Assertion function type that validates a value. * * Returns true if the assertion passes, false otherwise. */ export type AccessorValueAssertion = (value: T) => boolean; /** * Input provided to a set-value interceptor factory function. */ export interface SetValueInterceptorFunctionInput { target: object; propertyKey: string; descriptor: TypedPropertyDescriptor; setValue: (value: T) => void; } /** * Factory function that creates a setter interceptor from the provided input. */ export type SetValueInterceptorFunctionFactory = (input: SetValueInterceptorFunctionInput) => (value: T) => void; /** * Utility class for creating property descriptor interceptors that validate * values before allowing them to be set on a property. * * Used to build TypeScript decorator functions that enforce assertions on property setters. */ export declare class PropertyDescriptorUtility { /** * Creates a property descriptor interceptor that validates values using an assertion function * before allowing them to be set. Optionally maps the value after validation. * * @param assertValueFn - Function that returns true if the value is valid * @param options - Custom assertion options (message, map function) * @param defaultOptions - Default options merged under the custom options * @returns A property descriptor interceptor function */ static makePropertyDescriptorAssertion(assertValueFn: AccessorValueAssertion, options?: MapDescriptorAssertionOptions, defaultOptions?: MapDescriptorAssertionOptions): (target: object, propertyKey: string, descriptor: TypedPropertyDescriptor) => void; /** * Creates a low-level property descriptor interceptor that replaces the setter * of a property with a custom function produced by the given factory. * * @param makeSetValueInterceptorFn - Factory that produces the replacement setter function * @returns A property descriptor interceptor function */ static makeSetPropertyDescriptorInterceptor(makeSetValueInterceptorFn: SetValueInterceptorFunctionFactory): (target: object, propertyKey: string, descriptor: TypedPropertyDescriptor) => void; }