import { IObservableLikeValue } from '../../Core/Observable'; export interface IObservableExpression { /** * Using an observableExpression you can sign up for an action instead of * all actions which is the default. */ action?: string; /** * filter function that determines whether or not an action should affect * the state of the Observer. * * @param value The observable value that is being supplied for the action. * @param action The action that has taken place. * * @returns true if the Observer should setState, false if the change should * be ignored. */ filter?: (value: any, action: string) => boolean; /** * The observableValue is the value being observed. When actions are fired, * the filter is called and the results determine whether the component * changes state. */ observableValue: IObservableLikeValue; } export interface IObserverProps { /** * All props that should be passed down to the child element. * These properties are IObservableLikeValues, meaning that if they are observable, * we will attempt to subscribe to their changes. */ [propName: string]: IObservableLikeValue | IObservableExpression; }