@robotlegsjs/core
Version:
An architecture-based IoC framework for JavaScript/TypeScript
15 lines (14 loc) • 570 B
TypeScript
import { IInjector } from "../api/IInjector";
/**
* <p>A hook can be a function, object or class.</p>
*
* <p>When an object is passed it is expected to expose a "hook" method.</p>
*
* <p>When a class is passed, an instance of that class will be instantiated and called.
* If an injector is provided the instance will be created using that injector,
* otherwise the instance will be created manually.</p>
*
* @param hooks An array of hooks
* @param injector An optional Injector
*/
export declare function applyHooks(hooks: any[], injector?: IInjector): void;