import { Observable } from 'rxjs'; import { I as IExpressionEvaluateUnit, a as IExpressionEvaluateChangeManager, A as AbstractExpression, C as CommitHandler, b as IEvaluateManagerForExpression, c as IExpressionEvaluateManager, d as IIdentifierOwnerResolver, e as IExpressionTree, E as ExpressionType, f as IExpression, g as ChangeHook, h as IExpressionBindConfiguration, i as IExpressionParser, j as IExpressionServices, k as IExpressionIdProvider, l as IIdentifierWatchRuleFactory, m as IIdentifierWatchRuleData } from './expression-bind-configuration.type-DGqrNXib.js'; export { n as IBindConfigurationBase, o as IChangePathValue, p as IExpressionBindConfigurationExtra, q as IPropertyPath, r as IWatchRegistrationKey } from './expression-bind-configuration.type-DGqrNXib.js'; import { I as ICompiledExpressionPlan, a as ICompiledExpressionCompiler, b as IExpressionCacheData, c as IExpressionCache } from './compiled-expression-cache-preload-B8AUJs1L.js'; export { d as ICompiledExpressionWatchDependency, e as ICompiledMemberChainPlan, f as ICompiledMemberChainSegment, g as ICompiledSequenceOperandPlan, h as clearLazyExpressionPreloaders, i as clearPreparsedExpressionAsts, j as getLazyExpressionGroup, k as getPreparsedExpressionAst, l as getRegisteredCompiledExpressionPlan, m as hasLazyExpressionPreloader, n as hasLazyGroupPreloader, o as hydrateExpressionCacheWithCompiledExpressionPlans, p as hydrateExpressionCacheWithPreparsedAsts, r as registerCompiledExpressionPlanInExpressionCache, q as registerCompiledExpressionPlansInExpressionCache, s as registerLazyExpressionGroupPreloader, t as registerLazyExpressionInGroup, u as registerLazyExpressionPreloader, v as registerLazyExpressionPreloaders, w as registerPreparsedExpressionAst, x as registerPreparsedExpressionAsts, y as startLazyExpressionPreload, z as startLazyGroupPreload, A as triggerLazyExpressionPreload } from './compiled-expression-cache-preload-B8AUJs1L.js'; import { Expression } from 'estree'; import { IDisposable, KeyedInstanceFactory, IKeyedInstanceFactory, IDisposableOwner, IGuidFactory, IDeepCloneExcept, IIndexValueAccessor, IValueMetadata, AnyFunction, ConstructorType, ContainerModule } from '@rs-x/core'; import { IWatchFactory, IIndexWatchRule, IObserver, IObjectObserverProxyPairFactory, IObserverProxyPair, IProxyTarget, IStateManager } from '@rs-x/state-manager'; declare class ComputedIndexExpressionEvaluateUnit implements IExpressionEvaluateUnit { private readonly _watchFactory; private readonly _ownerId; private readonly _watchRule; private readonly _commit; readonly count = 1; private _value; private _context; private _indexValue; private _isDipsosed; private _indexEvaluateUnit; private _changeManager; private readonly _indexChangeManager; private _forceDirtyCommit; constructor(_watchFactory: IWatchFactory, _ownerId: unknown, _watchRule: IIndexWatchRule | undefined, _commit: (forceDirty?: boolean) => void); get value(): unknown; get context(): unknown; set context(value: unknown); get index(): unknown; setIndex(indexValue: unknown): void; watch(changeManager: IExpressionEvaluateChangeManager): void; dispose(): void; isCommitReady(): boolean; commitChange(): void; private releaseState; } declare class ConstExpressionEvaluateUnit implements IExpressionEvaluateUnit { readonly value: unknown; readonly context: unknown; readonly index: unknown; readonly count = 1; locked: boolean; constructor(value: unknown); dispose(): void; isCommitReady(): boolean; watch(changeManager: IExpressionEvaluateChangeManager): void; commitChange(): void; } interface IExpressionChangeCommitHandler { owner: AbstractExpression; commit: (root: AbstractExpression, pendingCommits: Set) => boolean; } type IExpressionCommitListener = () => void; interface IDirtyFlushable { flush(): void; } interface IExpressionChangeTransactionManager extends IDisposable { subscribeCommitted(listener: IExpressionCommitListener): () => void; suspend(): void; continue(): void; commit(): void; /** Register a manager to be flushed in the next shared microtask. */ scheduleDirtyFlush(manager: IDirtyFlushable): void; } declare class ExpressionEvaluateManager extends KeyedInstanceFactory implements IExpressionEvaluateManager { private readonly _expressionChangeTransactionManager; constructor(_expressionChangeTransactionManager: IExpressionChangeTransactionManager); getId(commit: CommitHandler): CommitHandler; protected createInstance(commit: CommitHandler, _: CommitHandler): IEvaluateManagerForExpression; protected createId(commit: CommitHandler): CommitHandler; protected releaseInstance(instance: IEvaluateManagerForExpression, _: CommitHandler): void; } declare class FunctionExpressionEvaluateUnit implements IExpressionEvaluateUnit, IExpressionEvaluateChangeManager { readonly index: unknown; private readonly _dependencies; private readonly _evaluate; private readonly _commit; private readonly _onDependencyDirty?; readonly count = 1; private _value; private _context; private _changeManager; private _isDisposed; private _isWatching; isInitialized(): boolean; incrementChangeCycle(): void; decrementChangeCycle(): void; markDirty(evaluateUnit: IExpressionEvaluateUnit): void; constructor(index: unknown, context: unknown, _dependencies: readonly IExpressionEvaluateUnit[], _evaluate: () => unknown, _commit: () => void, _onDependencyDirty?: ((evaluateUnit: IExpressionEvaluateUnit) => void) | undefined); get value(): unknown; get context(): unknown; set context(value: unknown); watch(changeManager: IExpressionEvaluateChangeManager): void; isCommitReady(): boolean; commitChange(): void; dispose(): void; private evaluateSafely; } declare class IdentifierExpressionEvaluateUnit implements IExpressionEvaluateUnit { readonly index: unknown; private readonly _watchFactory; private readonly _watchRule; private readonly _commit; private readonly _ownerId; private readonly _readValue?; private readonly _isDeferredValue?; private readonly _forceDirtyForObjectChanges; private readonly _forceDirtyForCollectionItemObjectChanges; private readonly _prepare?; readonly count = 1; private _value; private _context; private _watch; private _disposed; private _isReplica; private _changeManager; private _activeCycleDepth; private _forceDirtyCommit; constructor(index: unknown, context: unknown, _watchFactory: IWatchFactory, _watchRule: IIndexWatchRule | undefined, _commit: (value: unknown, forceDirty?: boolean) => void, _ownerId: unknown, _readValue?: ((context: unknown, index: unknown) => unknown) | undefined, _isDeferredValue?: ((value: unknown) => boolean) | undefined, _forceDirtyForObjectChanges?: boolean, _forceDirtyForCollectionItemObjectChanges?: boolean, _prepare?: (() => void) | undefined); get value(): unknown; get context(): unknown; set context(value: unknown); private onChanged; private onContextChanged; private onStartChangeCycle; private onEndChangeCycle; watchAsReplica(changeManager: IExpressionEvaluateChangeManager): void; applyChange(newValue: unknown): void; watch(changeManager: IExpressionEvaluateChangeManager): void; prepareForBatchEvaluate(): void; isCommitReady(): boolean; commitChange(): void; consumeForceDirtyCommit(): boolean; dispose(): void; private releaseWatch; private resolveValueFromContext; private refreshValueForUnchangedContext; } declare class MemberExpressionEvaluateUnit implements IExpressionEvaluateUnit { private _context; readonly index: unknown; private readonly _segments; readonly count: number; private _isDipsosed; private readonly _updatedSegmentIndexes; private _pendingStartSegmentIndex; private _changeManager; private _segmentsChangeManager; constructor(_context: unknown, index: unknown, _segments: readonly IExpressionEvaluateUnit[]); get context(): unknown; get value(): unknown; dispose(): void; watch(changeManager: IExpressionEvaluateChangeManager): void; private markDirty; isCommitReady(): boolean; commitChange(): void; } declare class SequenceExpressionEvaluateUnit implements IExpressionEvaluateUnit { readonly index: unknown; private readonly _dependencies; private readonly _evaluate; private readonly _commit; readonly count = 1; private _value; private _context; private _changeManager; private _isDisposed; private _isWatching; private readonly _dependencyChangeManager; constructor(index: unknown, context: unknown, _dependencies: readonly IExpressionEvaluateUnit[], _evaluate: () => unknown, _commit: () => void); get value(): unknown; get context(): unknown; set context(value: unknown); watch(changeManager: IExpressionEvaluateChangeManager): void; isCommitReady(): boolean; commitChange(): void; dispose(): void; private evaluateSafely; } declare class ArrayIndexOwnerResolver implements IIdentifierOwnerResolver { resolve(index: string | number, array: unknown[]): object | null; } declare class DefaultIdentifierOwnerResolver implements IIdentifierOwnerResolver { private readonly _identifierOwnerResolvers; constructor(_identifierOwnerResolvers: readonly IIdentifierOwnerResolver[]); resolve(index: unknown, context?: unknown): object | null; } declare class GlobalIdentifierOwnerResolver implements IIdentifierOwnerResolver { private static readonly allowedGlobals; resolve(index: unknown): object | null; } declare class MapKeyOwnerResolver implements IIdentifierOwnerResolver { resolve(index: unknown, map: unknown): object | null; } declare class PropertyOwnerResolver implements IIdentifierOwnerResolver { resolve(index: string, context: object): object | null; } declare class SetKeyOwnerResolver implements IIdentifierOwnerResolver { resolve(index: unknown, set: unknown): object | null; } declare class CompiledExpression implements IExpressionTree { private _plan; readonly isRoot = true; get parent(): IExpressionTree | undefined; get childExpressions(): readonly IExpressionTree[]; get hidden(): boolean; private _id; private _changed; private _lastChangedValue; private _changeHook; private _isAsync; private _isAsyncComputed; private _value; private _oldValue; private _isDirty; private _isDisposed; private _owner; private _leafIndexWatchRule; private _evaluateManagerForExpression; private _evaluateUnit; private _dependencyUnits; private _watchDependencies; private _hasOwnerPathDependencies; private _needsResolvedMemberProxyInPlan; private _isSingleRootIdentifierExpression; private _requiresDependencyUnitByName; private _identifierDependencyName; private _identifierDependencyUnit; private _depIsRootIdentifierDependency; private _depShouldForceDirty; private _depRequiresWatchRuleStatically; private _dependencyUnitByName; private _dependencyUnitByPath; private _dependencyWatchRules; private _dirtyDependencyNames; private readonly _readValue; private readonly _isDeferredValue; private _sequenceOperandValues; private _sequenceDependencySnapshot; private _proxyByObject; private _needsResolvedMemberProxy; private _shouldRefreshDependencyContexts; private _bindContext; private _runtimeServices; private _cachedIndexValueAccessor; private _cachedIdentifierOwnerResolver; private _cachedIdentifierWatchRuleFactory; private _cachedWatchFactory; private _cachedValueMetadata; private readonly _lazyExpressionString; private readonly _startLazyLoad; private _pendingBindSettings; private _lazyBindStarted; constructor(_plan: ICompiledExpressionPlan | undefined, lazyOptions?: { expressionString: string; startLazyLoad: () => Promise | undefined; }); private applyPlanState; get type(): ExpressionType; get expressionString(): string; get id(): string; get changed(): Observable; get isDisposed(): boolean; get changeHook(): ChangeHook | undefined; set changeHook(value: ChangeHook | undefined); clone(): this; get isAsync(): boolean | undefined; toString(): string; bind(settings: IExpressionBindConfiguration): IExpression; private bindResolved; private startLazyBinding; private initializeRuntimeBinding; private resetBindState; private bindDependencyUnits; private createDependencyUnit; private createEvaluateUnit; dispose(): void; get value(): unknown; private internalDispose; private evaluateCompiledValue; private isPlainObject; private commitValue; private commitIdentifierValue; private onDependencyDirty; private resolveOwnerContext; private refreshDependencyContexts; private createDependencyPathKey; private normalizeDependencyValue; private resolveDependencyArguments; private resolveDependencyValue; private readDependencyRawValue; private wrapForRuntimeEvaluation; private evaluateSequence; private hasCommonDependency; private collectActuallyChangedDependencies; private trackSequenceDependencyMutations; private evaluateMemberChain; private get runtimeIndexValueAccessor(); private get runtimeIdentifierOwnerResolver(); private get runtimeIdentifierWatchRuleFactory(); private get runtimeWatchFactory(); private get runtimeValueMetadata(); private get runtimeServices(); private get leafIndexWatchRule(); private initializeEvaluateManager; private evaluateBottomToTop; private markRootDirty; private tryEmitChanged; private evalateTopToBottom; private onCommit; } interface IJsExpressionAstParser { parse(expressionString: string): Expression; } declare class JsExpressionAstParser implements IJsExpressionAstParser { private static readonly _parseOptions; parse(expressionString: string): Expression; } declare class CompiledExpressionCompiler implements ICompiledExpressionCompiler { private readonly _jsExpressionAstParser; private static readonly DEFAULT_MAX_PLAN_CACHE_SIZE; private static readonly MAX_PLAN_CACHE_SIZE_ENV; private static readonly SIMPLE_IDENTIFIER_EXPRESSION_RE; private static readonly SIMPLE_MEMBER_CHAIN_EXPRESSION_RE; private static readonly RESERVED_KEYWORD_EXPRESSIONS; private readonly _planCache; private readonly _maxPlanCacheSize; constructor(_jsExpressionAstParser: IJsExpressionAstParser); tryCompile(expressionString: string): ICompiledExpressionPlan | undefined; private cachePlan; private resolveMaxPlanCacheSize; private getProcessEnv; private createUnitExpressionPlan; private buildPlan; private tryBuildSimpleMemberChainPlan; private collectDependencies; private collectWatchDependencies; private collectDependenciesAndWatchDependencies; private shouldSkipIdentifier; private mapExpressionType; private mapLiteralType; private resolveExpressionString; private mapBinaryOperatorToExpressionType; private mapLogicalOperatorToExpressionType; private mapUnaryOperatorToExpressionType; private isNode; private hasHiddenArgumentArray; private tryBuildSequenceOperandPlans; private tryBuildMemberChainPlan; private flattenMemberChain; private getStaticPath; } type RsxExpressionEngineMode = 'tree' | 'compiled'; interface ITreeExpressionEngine { create(expressionString: string): IExpression; } interface ICompiledExpressionEngine { tryCreate(expressionString: string): IExpression | undefined; } interface IExpressionEngineSelector { create(expressionString: string): IExpression; getMode(): RsxExpressionEngineMode; } declare class ExpressionCache extends KeyedInstanceFactory implements IExpressionCache { private readonly _expressionEngineSelector; private readonly _precompiledExpressions; private _hasPrecompiledExpressions; constructor(_expressionEngineSelector: IExpressionEngineSelector); registerExpressionTree(expressionString: string, expressionTree: IExpression): void; getId(data: IExpressionCacheData): string | undefined; protected createId(data: IExpressionCacheData): string; create(data: IExpressionCacheData): { referenceCount: number; instance: IExpression; id: string; }; protected createInstance(data: IExpressionCacheData): IExpression; } declare function registerPrecompiledCompiledExpressionPlan(expressionString: string, plan: ICompiledExpressionPlan): void; declare function registerPrecompiledCompiledExpressionPlans(plans: Readonly>): void; declare function getPrecompiledCompiledExpressionPlan(expressionString: string): ICompiledExpressionPlan | undefined; declare function clearPrecompiledCompiledExpressionPlans(): void; declare class ExpressionChangeTransactionManager implements IExpressionChangeTransactionManager { private readonly _listeners; private readonly _dirtyManagers; private _suspendCount; private _flushScheduled; dispose(): void; suspend(): void; continue(): void; subscribeCommitted(listener: () => void): () => void; commit(): void; scheduleDirtyFlush(manager: IDirtyFlushable): void; } interface IExpressionChangeHistory { expression: T; value: unknown; oldValue: unknown; } interface IExpressionChangeTracker extends IDisposable { readonly changed: Observable; pause(): void; continue(): void; } type IExpressionChangeTrackerManager = IKeyedInstanceFactory; declare class ExpressionChangeTracker implements IExpressionChangeTracker { private readonly _owner; private readonly _expression; private readonly _changedSubscription; private readonly _changed; private _isDisposed; private _paused; private readonly _changes; private readonly _seen; private _flushScheduled; constructor(_owner: IDisposableOwner, _expression: IExpressionTree); get changed(): Observable; pause(): void; continue(): void; dispose(): void; private onChanged; private scheduleFlush; private clearCycleState; } declare class ExpressionChangeTrackerManager extends KeyedInstanceFactory implements IExpressionChangeTrackerManager { constructor(); getId(expresion: IExpressionTree): IExpressionTree; protected createInstance(expresion: IExpressionTree, id: IExpressionTree): IExpressionChangeTracker; protected createId(expresion: IExpressionTree): IExpressionTree; } interface IExpressionChangePlayback { play(t: number, history: IExpressionChangeHistory[][]): void; } declare class ExpressionChangePlayback implements IExpressionChangePlayback { private readonly _expressionChangeTransactionManager; constructor(_expressionChangeTransactionManager: IExpressionChangeTransactionManager); play(t: number, history: IExpressionChangeHistory[][]): void; private clampT; } declare class CompiledExpressionEngine implements ICompiledExpressionEngine { private readonly _compiledExpressionCompiler; constructor(_compiledExpressionCompiler: ICompiledExpressionCompiler); tryCreate(expressionString: string): CompiledExpression | undefined; } declare class ExpressionEngineSelector implements IExpressionEngineSelector { private readonly _treeEngine; private readonly _compiledEngine; constructor(_treeEngine: ITreeExpressionEngine, _compiledEngine: ICompiledExpressionEngine); create(expressionString: string): IExpression; getMode(): RsxExpressionEngineMode; private getProcessEnv; } declare class TreeExpressionEngine implements ITreeExpressionEngine { private readonly _expressionParser; constructor(_expressionParser: IExpressionParser); create(expressionString: string): AbstractExpression; } interface IExpressionFactory { create(context: object, expression: string, leafIndexWatchRule?: IIndexWatchRule, compiled?: boolean, lazy?: boolean, lazyGroup?: string): IExpression; } interface IExpressionInfo { context: object; expression: string; } interface IExpressionIdData { expressionString: string; } interface IExpressionData extends IExpressionIdData { leafIndexWatchRule?: IIndexWatchRule; compiled?: boolean; lazy?: boolean; lazyGroup?: string; } type IExpressionForContextManager = IKeyedInstanceFactory; type IExpressionManager = IKeyedInstanceFactory; declare class ExpressionFactory implements IExpressionFactory { private readonly _expressionManager; constructor(_expressionManager: IExpressionManager); create(context: object, expressionString: string, leafIndexWatchRule?: IIndexWatchRule, compiled?: boolean, lazy?: boolean, lazyGroup?: string): IExpression; } declare class ExpressionManager extends KeyedInstanceFactory implements IExpressionManager { private readonly _expressionCache; private readonly _services; getId(context: object): object; protected createId(context: object): object; constructor(_expressionCache: IExpressionCache, _services: IExpressionServices); protected createInstance(context: object, id: object): IExpressionForContextManager; protected releaseInstance(instance: IExpressionForContextManager): void; } declare class ExpressionIdProvider { private readonly _idFactory; private readonly _rootIdByRoot; constructor(_idFactory: IGuidFactory); getId(node: IExpressionTree): string; private getRoot; private getOrCreateRootId; } type ExpressionNodeId = string; declare class ExpressionNodeIdIndex { private readonly _idToNode; private readonly _nodeToId; private constructor(); static build(root: IExpressionTree): ExpressionNodeIdIndex; getId(node: IExpressionTree): ExpressionNodeId; getNode(id: ExpressionNodeId): IExpressionTree; private buildInternal; } declare class DeepCloneExceptWithExpressionSupport implements IDeepCloneExcept { private readonly _defaultDeepCloneValueGetter; constructor(_defaultDeepCloneValueGetter: IDeepCloneExcept); except(source: unknown): unknown; } type IExpressionIndexAccessor = IIndexValueAccessor; declare class ExpressionIndexAccessor implements IExpressionIndexAccessor { readonly priority: 300; getResolvedValue(context: unknown, index: string): unknown; hasValue(context: unknown, index: string): boolean; getValue(context: unknown, index: string): unknown; setValue(): void; getIndexes(): IterableIterator; applies(context: unknown, index: string): boolean; } interface IExpressionObserverData { owner?: IDisposableOwner; expression: AbstractExpression; } type IExpressionObserverFactory = IKeyedInstanceFactory; declare class ExpressionObserverFactory extends KeyedInstanceFactory implements IExpressionObserverFactory { constructor(); getId(data: IExpressionObserverData): AbstractExpression; protected createId(data: IExpressionObserverData): AbstractExpression; protected createInstance(data: IExpressionObserverData, id: AbstractExpression): IObserver; protected releaseInstance(observer: IObserver): void; } type IExpressionObserverProxyPairFactory = IObjectObserverProxyPairFactory; type IExpressionObserverProxyPair = IObserverProxyPair; declare class ExpressionObserverProxyPairFactory implements IExpressionObserverProxyPairFactory { private readonly _expressionObserverFactory; readonly priority = 100; constructor(_expressionObserverFactory: IExpressionObserverFactory); create(owner: IDisposableOwner, proxyTarget: IProxyTarget): IExpressionObserverProxyPair; applies(object: unknown): boolean; } declare class ExpressionServices implements IExpressionServices { readonly expressionEvaluateManager: IExpressionEvaluateManager; readonly stateManager: IStateManager; readonly indexValueAccessor: IIndexValueAccessor; readonly guidFactory: IGuidFactory; readonly valueMetadata: IValueMetadata; readonly expressionIdProvider: IExpressionIdProvider; readonly identifierOwnerResolver: IIdentifierOwnerResolver; readonly identifierWatchRuleFactory: IIdentifierWatchRuleFactory; readonly watchFactory: IWatchFactory; constructor(expressionEvaluateManager: IExpressionEvaluateManager, stateManager: IStateManager, indexValueAccessor: IIndexValueAccessor, guidFactory: IGuidFactory, valueMetadata: IValueMetadata, expressionIdProvider: IExpressionIdProvider, identifierOwnerResolver: IIdentifierOwnerResolver, identifierWatchRuleFactory: IIdentifierWatchRuleFactory, watchFactory: IWatchFactory); } declare abstract class ParameterizedExpression extends AbstractExpression { private _preparedArgs; protected constructor(type: ExpressionType, expressionString: string, ...childExpressions: AbstractExpression[]); protected abstract evaluateExpression(...args: unknown[]): T; protected canEvaluate(): boolean; protected evaluate(): T; protected readArg(childExpression: AbstractExpression): unknown; private isExpressionReferenceValue; } declare abstract class BinaryExpression extends ParameterizedExpression { protected constructor(expressionType: ExpressionType, expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); clone(): this; protected canEvaluate(): boolean; protected evaluate(): T; } declare class AdditionExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare abstract class CollectionExpression extends ParameterizedExpression { constructor(type: ExpressionType, expressionString: string, expressions: AbstractExpression[]); } declare class ArrayExpression extends CollectionExpression { constructor(expressions: AbstractExpression[]); clone(): this; protected evaluateExpression(...args: unknown[]): unknown[]; } declare class BitwiseAndExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class BitwiseLeftShiftExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class BitwiseNotExpression extends ParameterizedExpression { constructor(expressionString: string, expression: AbstractExpression); clone(): this; protected evaluateExpression(a: number): number; } declare class BitwiseOrExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class BitwiseRightShiftExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class BitwiseUnsignedRightShiftExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class BitwiseXorExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class ComputedIndexExpression extends ParameterizedExpression { private _expressionEvaluateUnit; constructor(expression: AbstractExpression); clone(): this; protected get expressionEvaluateUnit(): ComputedIndexExpressionEvaluateUnit; private commitCallback; protected evaluateBottomToTop(): boolean; private setCalculateddIndex; protected onBind(settings: IExpressionBindConfiguration): void; protected createEvaluateManagerForExpression(): IEvaluateManagerForExpression; protected get isEvaluationBoundary(): boolean; protected evaluateExpression(indexValue: unknown): unknown; private isStaticIndexExpression; } declare class ConditionalExpression extends ParameterizedExpression { constructor(expressionString: string, condition: AbstractExpression, ifValueExpression: AbstractExpression, elseValueExpression: AbstractExpression); clone(): this; protected evaluateExpression(condition: unknown, consequent: unknown, alternate: unknown): unknown; } declare class ConstantExpression extends AbstractExpression { private readonly _constValue; constructor(type: ExpressionType, expressionString: string, constValue: T); clone(): this; protected get constValue(): T; protected onBind(settings: IExpressionBindConfiguration): void; protected evaluate(): T | undefined; } declare class ConstantBigIntExpression extends ConstantExpression { constructor(value: bigint); } declare class ConstantBooleanExpression extends ConstantExpression { constructor(value: boolean); } declare class ConstantNullExpression extends ConstantExpression { constructor(); clone(): this; } declare class ConstantNumberExpression extends ConstantExpression { constructor(value: number); } declare class ConstantRegExpExpression extends ConstantExpression { constructor(expressionString: string, value: RegExp); clone(): this; } declare class ConstantStringExpression extends ConstantExpression { constructor(value: string); } declare class DivisionExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class EqualityExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): boolean; } declare class ExponentiationExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(base: number, exponent: number): number; } declare class FunctionExpression extends AbstractExpression { private readonly _functionExpression; private readonly _objectExpression; private readonly _argumentsExpression; private readonly _computed; private readonly _optional; private _functionContext; private _functionId; private _context; private _expressionEvaluateUnit; private _isMemberSegment; private _argumentEvaluateUnits; constructor(expressionString: string, _functionExpression: AbstractExpression, _objectExpression: AbstractExpression, _argumentsExpression: ArrayExpression, _computed: boolean, _optional: boolean); clone(): this; protected bindChildren(settings: IExpressionBindConfiguration): void; protected get expressionEvaluateUnit(): IExpressionEvaluateUnit | undefined; protected internalDispose(): void; protected evaluate(): unknown; private get functionName(); private releaseResult; private registerResult; private commitValue; private evaluateArgumentsFromUnits; } declare class GreaterThanExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): boolean; } declare class GreaterThanOrEqualExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): boolean; } declare class IdentifierExpression extends AbstractExpression { private _context; private _indexWatchRule; private _isAsync; private _expressionEvaluateUnit; private _isMemberSegment; private readonly _isStaticMemberLeaf; private readonly _isLeaf; private readonly _isMemberExpressionSegment; constructor(expressionString: string, isStaticMemberLeaf?: boolean, isLeaf?: boolean, isMemberExpressionSegment?: boolean); get isAsync(): boolean | undefined; private get index(); setValue(value: unknown): void; clone(): this; protected get expressionEvaluateUnit(): IExpressionEvaluateUnit; protected onBind(settings: IExpressionBindConfiguration): void; protected internalDispose(): void; protected evaluate(): unknown; private commitValue; } declare class IdentifierWatchRuleFactory implements IIdentifierWatchRuleFactory { private readonly _identifierIndexWatchRuleManager; constructor(indexValueAccessor: IIndexValueAccessor, valueMetadata: IValueMetadata); create(context: unknown, data: IIdentifierWatchRuleData): IIndexWatchRule; } declare class InExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: string, b: object): boolean; } declare class InequalityExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): boolean; } declare class InstanceofExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(object: object, type: ConstructorType): boolean; } declare class LessThanExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): boolean; } declare class LessThanOrEqualExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): boolean; } declare class LogicalAndExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): unknown; } declare class LogicalNotExpression extends ParameterizedExpression { constructor(expressionString: string, expression: AbstractExpression); clone(): this; protected evaluateExpression(value: unknown): boolean; } declare class LogicalOrExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): unknown; } declare class MemberExpression extends AbstractExpression { private _expressionEvaluateUnit; constructor(expressionString: string, pathSeqments: AbstractExpression[]); clone(): this; protected bindChildren(settings: IExpressionBindConfiguration): void; protected get expressionEvaluateUnit(): MemberExpressionEvaluateUnit | undefined; protected internalDispose(): void; protected evaluate(): unknown; } declare class MultiplicationExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class NewExpression extends ParameterizedExpression { constructor(expressionString: string, constructorExpression: AbstractExpression, argumentExpressions: AbstractExpression[]); clone(): this; protected evaluateExpression(constructorFunction: ConstructorType, ...args: unknown[]): unknown; } declare class NullishCoalescingExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): unknown; } declare class PropertyExpression extends BinaryExpression { constructor(expressionString: string, keyExpression: AbstractExpression, valueExpression: AbstractExpression); protected evaluateExpression(key: PropertyKey, value: unknown): object; } declare class SpreadExpression extends ParameterizedExpression { constructor(expression: ArrayExpression | ObjectExpression | IdentifierExpression); clone(): this; protected evaluateExpression(...args: unknown[]): unknown[] | object; } declare class ObjectExpression extends ParameterizedExpression { constructor(expressionString: string, propertyExpressions: (PropertyExpression | SpreadExpression)[]); clone(): this; protected evaluateExpression(...args: unknown[]): object; } declare class RemainderExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class SequenceExpression extends AbstractExpression { private _expressionEvaluateUnit; constructor(expressionString: string, expressions: AbstractExpression[]); clone(): this; protected bindChildren(settings: IExpressionBindConfiguration): void; protected get expressionEvaluateUnit(): IExpressionEvaluateUnit | undefined; protected internalDispose(): void; protected evaluate(): unknown; protected shouldAbortTopDownEvaluation(): boolean; private commitValue; } declare class StrictEqualityExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): boolean; } declare class StrictInequalityExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: unknown, b: unknown): boolean; } declare class SubtractionExpression extends BinaryExpression { constructor(expressionString: string, leftExpression: AbstractExpression, rightExpression: AbstractExpression); protected evaluateExpression(a: number, b: number): number; } declare class TemplateLiteralExpression extends CollectionExpression { constructor(expressionString: string, expressions: AbstractExpression[]); clone(): this; protected evaluateExpression(...segments: unknown[]): string; } declare class TypeofExpression extends ParameterizedExpression { constructor(expressionString: string, expression: AbstractExpression); clone(): this; protected evaluateExpression(value: unknown): string; } declare class UnaryNegationExpression extends ParameterizedExpression { constructor(expressionString: string, expression: AbstractExpression); clone(): this; protected evaluateExpression(value: number): number; } declare class UnaryPlusExpression extends ParameterizedExpression { constructor(expressionString: string, expression: AbstractExpression); clone(): this; protected evaluateExpression(a: string | number): number; } declare class ExpressionTreeBuilder { private _currentExpressionSource; private readonly createConstantExpression; private readonly expressionFactories; private readonly unaryExpressionFactories; private readonly binaryExpressionFactories; private readonly logicalExpressionFactories; constructor(); parseAst(expressionAst: Expression, expressionSource: string): AbstractExpression; private createExpression; private createLiteralExpression; private createBinaryExpression; private createAssignmentExpression; private createUnaryExpression; private createConditionalExpression; private createLogicalExpression; private createChainExpression; private createMemberExpression; private createSequenceExpression; private createIdentifier; private createArrayExpression; private createSpreadExpression; private createNewExpression; private createCallExpression; private createTemplateLiteralExpression; private createTaggedTemplateExpression; private createTemplateElementExpression; private createUnaryPlusExpression; private createUnaryMinusExpression; private createLogicalNotExpression; private createTypeofExpression; private createDeleteExpression; private createEqualToExpression; private createNotEqualToExpression; private createStrictEqualToExpression; private createStrictNotEqualToExpression; private createLessThanExpression; private createLessThanOrEqualToExpression; private createGreaterThanExpression; private createGreaterThanOrEqualToExpression; private createBitwiseNotExpression; private createLeftShiftExpression; private createRightShiftExpression; private createUnsignedRightShiftExpression; private createBitwiseOrExpression; private createBitwiseXOrExpression; private createBitwiseAndExpression; private createAdditionExpression; private createSubstractionExpression; private createMultiplicationExpression; private createDivisionExpression; private createModulusExpression; private createExponentiationExpression; private createInstanceOfExpression; private createInExpression; private createLogicalOrExpression; private createLogicalAndExpression; private createNullishCoalescingExpression; private createObjectExpression; private createPropertyExpression; private getExpressionSource; private normalizeMemberProperty; private flattenMemberExpression; } declare class JsEspreeExpressionParser extends ExpressionTreeBuilder { private readonly _jsExpressionAstParser; constructor(_jsExpressionAstParser?: IJsExpressionAstParser); parse(expressionString: string): AbstractExpression; } declare class JsExpressionParser implements IExpressionParser { private readonly _jsExpressionAstParser; private readonly _expressionTreeBuilder; constructor(_jsExpressionAstParser?: IJsExpressionAstParser, _expressionTreeBuilder?: ExpressionTreeBuilder); parse(expressionString: string): AbstractExpression; parseAst(expressionAst: Expression, expressionSource: string): AbstractExpression; } declare const RsXExpressionParserModule: ContainerModule; declare function unloadRsXExpressionParserModule(): Promise; declare const RsXExpressionParserInjectionTokens: { PropertyOwnerResolver: symbol; ArrayIndexOwnerResolver: symbol; MapKeyOwnerResolver: symbol; SetKeyOwnerResolver: symbol; GlobalIdentifierOwnerResolver: symbol; IdentifierOwnerResolver: symbol; IIdentifierOwnerResolverList: symbol; IExpressionManager: symbol; IExpressionChangeTransactionManager: symbol; IExpressionTreeBuilder: symbol; IExpressionParser: symbol; IJsExpressionAstParser: symbol; IExpressionFactory: symbol; IExpressionObserverProxyPairFactory: symbol; IExpressionIndexAccessor: symbol; IExpressionObserverFactory: symbol; IExpressionCache: symbol; ICompiledExpressionCompiler: symbol; ITreeExpressionEngine: symbol; ICompiledExpressionEngine: symbol; IExpressionEngineSelector: symbol; IExpressionServices: symbol; IExpressionEvaluateManager: symbol; ExpressiomMetadata: symbol; IExpressionChangePlayback: symbol; IExpressionChangeTrackerManager: symbol; IExpressionIdProvider: symbol; IIdentifierWatchRuleFactory: symbol; }; interface IRsxOptions { readonly preparse?: boolean; readonly lazy?: boolean; /** * Named lazy group. When set, the expression belongs to this group and the * entire group's manifest is loaded on first use — not just this expression. * Implies lazy: true. Use this to batch related lazy expressions so a single * dynamic import covers all of them. */ readonly lazyGroup?: string; readonly compiled?: boolean; } /** * Global RS-X compile-time configuration. * * Augment this interface in your project to set global defaults. * When `compiledByDefault` is `true`, `rsx("expr")` without an explicit * `compiled` option returns `IExpression` (no tree structure). * * @example — compiled-by-default project (add to a .d.ts included by tsconfig): * ```ts * declare module '@rs-x/expression-parser' { * interface IRsxConfig { * compiledByDefault: true; * } * } * ``` */ interface IRsxConfig { } type IsCompiledByDefault = IRsxConfig extends { compiledByDefault: true; } ? true : false; /** Return type for `rsx()` when no explicit `compiled` option is given. */ type DefaultRsxReturn = IsCompiledByDefault extends true ? IExpression : IExpressionTree; declare const getExpressionFactory: () => IExpressionFactory; /** * Compiled mode — explicitly compiled, returns IExpression (no tree structure). */ declare function rsx(expressionString: string, options: IRsxOptions & { readonly compiled: true; }): (model: TModel, leafIndexWatchRule?: IIndexWatchRule) => IExpression; /** * Tree mode — explicitly not compiled, returns IExpressionTree. */ declare function rsx(expressionString: string, options: IRsxOptions & { readonly compiled: false; }): (model: TModel, leafIndexWatchRule?: IIndexWatchRule) => IExpressionTree; /** * Default mode — no explicit `compiled` option. * Return type is `IExpressionTree` unless `IRsxConfig.compiledByDefault` * is augmented to `true`, in which case it is `IExpression`. */ declare function rsx(expressionString: string, options?: IRsxOptions): (model: TModel, leafIndexWatchRule?: IIndexWatchRule) => DefaultRsxReturn; export { AbstractExpression, AdditionExpression, ArrayExpression, ArrayIndexOwnerResolver, BinaryExpression, BitwiseAndExpression, BitwiseLeftShiftExpression, BitwiseNotExpression, BitwiseOrExpression, BitwiseRightShiftExpression, BitwiseUnsignedRightShiftExpression, BitwiseXorExpression, ChangeHook, CollectionExpression, CommitHandler, CompiledExpression, CompiledExpressionCompiler, CompiledExpressionEngine, ComputedIndexExpression, ComputedIndexExpressionEvaluateUnit, ConditionalExpression, ConstExpressionEvaluateUnit, ConstantBigIntExpression, ConstantBooleanExpression, ConstantExpression, ConstantNullExpression, ConstantNumberExpression, ConstantRegExpExpression, ConstantStringExpression, DeepCloneExceptWithExpressionSupport, DefaultIdentifierOwnerResolver, DivisionExpression, EqualityExpression, ExponentiationExpression, ExpressionCache, ExpressionChangePlayback, ExpressionChangeTracker, ExpressionChangeTrackerManager, ExpressionChangeTransactionManager, ExpressionEngineSelector, ExpressionEvaluateManager, ExpressionFactory, ExpressionIdProvider, ExpressionIndexAccessor, ExpressionManager, type ExpressionNodeId, ExpressionNodeIdIndex, ExpressionObserverFactory, ExpressionObserverProxyPairFactory, ExpressionServices, ExpressionType, FunctionExpression, FunctionExpressionEvaluateUnit, GlobalIdentifierOwnerResolver, GreaterThanExpression, GreaterThanOrEqualExpression, ICompiledExpressionCompiler, type ICompiledExpressionEngine, ICompiledExpressionPlan, type IDirtyFlushable, IEvaluateManagerForExpression, IExpression, IExpressionBindConfiguration, IExpressionCache, IExpressionCacheData, type IExpressionChangeCommitHandler, type IExpressionChangeHistory, type IExpressionChangePlayback, type IExpressionChangeTracker, type IExpressionChangeTrackerManager, type IExpressionChangeTransactionManager, type IExpressionCommitListener, type IExpressionData, type IExpressionEngineSelector, IExpressionEvaluateChangeManager, IExpressionEvaluateManager, IExpressionEvaluateUnit, type IExpressionFactory, type IExpressionForContextManager, type IExpressionIdData, IExpressionIdProvider, type IExpressionIndexAccessor, type IExpressionInfo, type IExpressionManager, type IExpressionObserverData, type IExpressionObserverFactory, type IExpressionObserverProxyPair, IExpressionParser, IExpressionServices, IExpressionTree, IIdentifierOwnerResolver, IIdentifierWatchRuleData, IIdentifierWatchRuleFactory, type IJsExpressionAstParser, type IRsxConfig, type IRsxOptions, type ITreeExpressionEngine, IdentifierExpression, IdentifierExpressionEvaluateUnit, IdentifierWatchRuleFactory, InExpression, InequalityExpression, InstanceofExpression, JsEspreeExpressionParser, JsExpressionAstParser, JsExpressionParser, LessThanExpression, LessThanOrEqualExpression, LogicalAndExpression, LogicalNotExpression, LogicalOrExpression, MapKeyOwnerResolver, MemberExpression, MemberExpressionEvaluateUnit, MultiplicationExpression, NewExpression, NullishCoalescingExpression, ObjectExpression, ParameterizedExpression, PropertyExpression, PropertyOwnerResolver, RemainderExpression, RsXExpressionParserInjectionTokens, RsXExpressionParserModule, type RsxExpressionEngineMode, SequenceExpression, SequenceExpressionEvaluateUnit, SetKeyOwnerResolver, SpreadExpression, StrictEqualityExpression, StrictInequalityExpression, SubtractionExpression, TemplateLiteralExpression, TreeExpressionEngine, TypeofExpression, UnaryNegationExpression, UnaryPlusExpression, clearPrecompiledCompiledExpressionPlans, getExpressionFactory, getPrecompiledCompiledExpressionPlan, registerPrecompiledCompiledExpressionPlan, registerPrecompiledCompiledExpressionPlans, rsx, unloadRsXExpressionParserModule };