@xcons/widget
Version:
XCon Studio widget utilities with advanced template rendering, reactive binding system and registry pattern support
63 lines (62 loc) • 1.81 kB
TypeScript
import type { ComputedPropertyInfo } from './reactive-computed.decorator';
export declare class ReactiveComputedManager {
private logContext;
private computedProperties;
private computedPropertiesInfo;
private computedCache;
private computedDependencyValues;
private hasComputedProperties;
constructor(logContext?: string);
/**
* Detect computed properties from decorators
*/
detectComputedProperties(model: any): void;
/**
* CRITICAL FIX: Get computed value with proper context and dependency tracking
*/
getComputedValue(propertyKey: string, originalGetter: Function, context: any): any;
/**
* CRITICAL FIX: Get property value from context with proper resolution
*/
private getPropertyValue;
/**
* Invalidate computed value
*/
invalidateComputedValue(propertyKey: string): void;
/**
* Invalidate computed properties that depend on a changed property
*/
invalidateComputedDependingOn(changedProperty: string): string[];
/**
* Add computed property manually
*/
addComputedProperty(propertyName: string, dependencies: string[]): boolean;
/**
* Remove computed property
*/
removeComputedProperty(propertyName: string): boolean;
/**
* Get computed properties
*/
getComputedProperties(): Map<string, string[]>;
/**
* Get computed properties info (full info)
*/
getComputedPropertiesInfo(): Map<string, ComputedPropertyInfo>;
/**
* Check if has computed properties
*/
hasProperties(): boolean;
/**
* Get count of computed properties
*/
getCount(): number;
/**
* Clear all computed properties
*/
clear(): void;
/**
* Generic logging method
*/
private log;
}