armstrong-react
Version:
Rocketmakers Armstrong library of React components
14 lines (13 loc) • 511 B
TypeScript
export interface IFormBinder<P, D> {
setElementProperty(props: P, dataBinder: IDataBinder<D>): void;
handleValueChanged(props: P, dataBinder: IDataBinder<D>, notifyChanged: () => void): void;
extender?(props: P, dataBinder: IDataBinder<D>, notifyChanged: () => void): void;
}
export interface IDataBinder<T> {
getValue(dataName: string): any;
setValue(dataName: string, value: any): void;
toJson(): T;
}
export interface IFormBinderInjector<P> {
__formBinder: IFormBinder<P, any>;
}