UNPKG

@ablestack/rdo

Version:

A library to facilitate building and running graphs of Reactive Domain Objects - connecting JSON data sources to reactive client applications

27 lines (26 loc) 928 B
export interface IEqualsComparer<T> { (a: T, b: T): boolean; } export interface IUpdateIfNotEqual<T> { (a: T, b: T, set: (T: any) => void): boolean; } declare function apolloComparer(a: any, b: any): boolean; declare function identityComparer(a: any, b: any): boolean; declare function referentialComparer(a: any, b: any): boolean; export declare const comparers: { valueGraph: typeof apolloComparer; identity: typeof identityComparer; referential: typeof referentialComparer; }; export declare const comparerUtils: { valueGraph: { updateIfNotEqual: <T>(origVal: T, newVal: T, set: (T: any) => void) => boolean; }; identity: { updateIfNotEqual: <T_1>(origVal: T_1, newVal: T_1, set: (T: any) => void) => boolean; }; referential: { updateIfNotEqual: <T_2>(origVal: T_2, newVal: T_2, set: (T: any) => void) => boolean; }; }; export {};