You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
808 B

7 years ago
import { Lambda } from "../utils/utils";
import { IObservableArray } from "../types/observablearray";
import { ObservableMap } from "../types/observablemap";
import { IObservableValue } from "../types/observablevalue";
export declare type ReadInterceptor<T> = (value: any) => T;
/** Experimental feature right now, tested indirectly via Mobx-State-Tree */
export declare function interceptReads<T>(value: IObservableValue<T>, handler: ReadInterceptor<T>): Lambda;
export declare function interceptReads<T>(observableArray: IObservableArray<T>, handler: ReadInterceptor<T>): Lambda;
export declare function interceptReads<T>(observableMap: ObservableMap<T>, handler: ReadInterceptor<T>): Lambda;
export declare function interceptReads(object: Object, property: string, handler: ReadInterceptor<any>): Lambda;