hooks
@tsed/hooks
Usage
typescript
import { hooks } from "@tsed/hooks";Overview
ts
const hooks: Hooks;Description
Global singleton instance of the Hooks class.
This instance provides a centralized event management system that can be used throughout an application without needing to create and pass around separate Hooks instances.
Usage
typescript
import {hooks} from "@tsed/hooks";
hooks.on("app:started", () => {
console.log("Application started");
});
hooks.emit("app:started", []);