UNPKG

@nivinjoseph/n-eda

Version:

Event Driven Architecture framework

15 lines 436 B
import { given } from "@nivinjoseph/n-defensive"; export class DefaultEdaContext { constructor() { this._topic = null; } get topic() { given(this, "this").ensure(t => t._topic != null, "topic not set"); return this._topic; } set topic(value) { given(value, "topic").ensureHasValue().ensureIsString(); this._topic = value.trim(); } } //# sourceMappingURL=eda-context.js.map