UNPKG

surrogate

Version:

Object method hooks made easy

14 lines (13 loc) 615 B
import type { Surrogate } from '../../../interfaces'; import type { SurrogateProxy } from '../../handler'; import type { FetchRule } from '../interfaces'; export declare abstract class ProxyRule<T extends object> implements FetchRule { protected readonly proxy: SurrogateProxy<T>; protected readonly target: T; protected readonly event: string; protected readonly receiver: Surrogate<T>; constructor(proxy: SurrogateProxy<T>, target: T, event: string, receiver: Surrogate<T>); protected get isDisposed(): boolean; abstract returnableValue(): any; abstract shouldHandle(): boolean; }