UNPKG

surrogate

Version:

Object method hooks made easy

18 lines (17 loc) 879 B
import type { SurrogateHandler, SurrogateHandlerTypes } from '../interfaces'; import { SurrogateHandlerRunner } from '../handler'; import type { HandlerContainer } from './interfaces'; import type { WhichMethod } from '../which'; import { OptionsHandler } from '../options'; import type { Context } from '../context'; import type { NextNode } from '../next'; export declare abstract class BaseContainer<T extends object> implements HandlerContainer<T> { protected handler: SurrogateHandlerTypes<T> | Function; type: WhichMethod; options: OptionsHandler<T>; constructor(handler: SurrogateHandlerTypes<T> | Function, type: WhichMethod, options?: OptionsHandler<T>); getHandler(context: Context<T>): Function | SurrogateHandler<T>; private shouldReflect; private shouldReflectSurrogate; getHandlerRunner(node: NextNode<T>): SurrogateHandlerRunner; }