export type Validator = (x: any) => void; export interface ImmutableLike { fromJS: (js: any, context?: any) => any; } export type PropertyType = 'date' | 'array'; export declare const PropertyType: { DATE: PropertyType; ARRAY: PropertyType; }; export interface Property = any> { name: keyof T & string; defaultValue?: any; possibleValues?: readonly any[]; validate?: Validator | Validator[]; type?: PropertyType; immutableClass?: ImmutableLike; immutableClassArray?: ImmutableLike; equal?: (a: any, b: any) => boolean; toJS?: (v: any) => any; contextTransform?: (context: Record) => Record; preserveUndefined?: boolean; emptyArrayIsOk?: boolean; } export interface ClassFnType { PROPERTIES: Property[]; fromJS(properties: any, context?: any): any; new (properties: any): any; } export interface ImmutableInstanceType { valueOf(): ValueType; toJS(): JSType; toJSON(): JSType; toString(): string; equals(other: ImmutableInstanceType | undefined): boolean; } export interface BackCompat { condition: (js: any) => boolean; action: (js: any) => void; } export declare abstract class BaseImmutable, JSType> implements ImmutableInstanceType { static jsToValue = any>(properties: Property[], js: any, backCompats?: BackCompat[], context?: Record): any; static finalize(ClassFn: ClassFnType): void; static ensure: { number: (n: any) => void; positive: (n: any) => void; nonNegative: (n: any) => void; }; constructor(value: ValueType); ownProperties(): Property[]; findOwnProperty(propName: keyof ValueType & string): Property | undefined; hasProperty(propName: keyof ValueType & string): boolean; valueOf(): ValueType; toJS(): JSType; toJSON(): JSType; toString(): string; getDifference(other: BaseImmutable | undefined, returnOnFirstDifference?: boolean): string[]; equals(other: BaseImmutable | undefined): boolean; equivalent(other: BaseImmutable): boolean; get(propName: T): ValueType[T]; change(propName: T, newValue: ValueType[T]): this; changeMany(properties: Partial): this; deepChange(propName: string, newValue: any): this; deepGet(propName: string): any; } //# sourceMappingURL=base-immutable.d.ts.map