rich-domain
Version:
This package provide utils file and interfaces to assistant build a complex application with domain driving design
21 lines • 925 B
TypeScript
import { EventManager } from "../types";
/**
* @description The Context class provides a platform-aware mechanism for
* retrieving a global event manager instance. Depending on the environment
* (Node.js or browser), it initializes and returns an appropriate event manager.
*/
export declare abstract class Context {
private static eventManager;
/**
* @description Retrieves the global event manager instance for the current platform.
* If one does not already exist, it is created based on the detected runtime environment.
* - In Node.js environments, it uses `ServerEventManager`.
* - In browser environments, it uses `BrowserEventManager`.
*
* @throws Will throw an error if the platform cannot be determined.
* @returns The platform-specific `EventManager` instance.
*/
static events(): EventManager;
}
export default Context;
//# sourceMappingURL=context.d.ts.map