UNPKG

rich-domain

Version:

This package provide utils file and interfaces to assistant build a complex application with domain driving design

17 lines 757 B
/** * @description Validates the format of an event name to ensure it follows the required pattern. * The expected pattern is `"contextName:EventName"`, where the event name must include a colon (`":"`) * to separate the context name and the event name. * * @param eventName The event name to validate. Must be a string containing a colon (`":"`). * * @throws {Error} Throws an error if the event name does not include a colon (`":"`). * * @example * ```typescript * validateContextEventName("user:created"); // Passes validation * validateContextEventName("invalidEventName"); // Throws an error * ``` */ export default function validateContextEventName(eventName: string): void; //# sourceMappingURL=validate-context-event-name.util.d.ts.map