export type OptionConfig = { overrideMethods?: Partial>; init?(this: IOption): void; default: Value | ((ctx: Context) => Value); set?(this: IOption, v: Value, ctx: Context): void; equal?(a: Value, b: Value): boolean; dispose?(this: IOption): void; [key: string]: any; }; export interface IOption { name: string; fields?: { [key: string]: any; }; parent: Options; context: Context; current: Value; dirty: boolean; options: OptionConfig; equal(a: Value, b: Value): boolean; default(): Value; reset(): void; set(v: Value): boolean; get(): Value; dispose(): void; } export declare class Option implements IOption { name: string; fields?: { [key: string]: any; }; parent: Options; context: Context; options: OptionConfig; current: Value; dirty: boolean; constructor(context: Context, options: OptionConfig); equal(a: Value, b: Value): boolean; default(): Value; reset(): void; shouldUpdate(v: Value): boolean; set(v: Value): boolean; get(): Value; dispose(): void; } export type OptionsProperties = { [key in keyof Props]: OptionConfig; }; export type OptionsPropertiesInstance = { [key in keyof Props]: IOption; }; type OptionMap = Map>; type OptionConstructor = typeof Option; type OptionClassMap = Map>; export type OptionsInstance = Options & OptionsPropertiesInstance; export declare class Options { static create(context: Context, props: OptionsProperties): OptionsInstance; context: Context; options: OptionMap; optionClass: OptionClassMap; constructor(context: Context, props?: OptionsProperties); register(name: K, optionClass: OptionConstructor): void; private defineGetter; initOptions(props: OptionsProperties): void; getOption(key: K): IOption; removeOption(key: keyof Props): void; addOptionFromInstance(key: keyof Props, option: IOption): void; addOptionFromConfig(key: keyof Props, option: OptionConfig]>): void; } export {};