Stone.js API
    Preparing search index...

    What a notice declares about itself.

    Metadata only. Content lives in the class, which is why there is no content here: a decorator that carried message bodies would put text in the one place it cannot be translated, formatted or computed.

    interface NoticeDeclaration {
        channels?: string[];
        isClass?: boolean;
        module?: unknown;
        name: string;
        on?: string;
    }
    Index
    channels?: string[]

    The channels it uses. Defaults to stone.notifications.default.

    isClass?: boolean

    Whether module is a class.

    module?: unknown

    The class. Built through the container, so it can ask for i18n, a repository, anything.

    name: string

    The name a caller refers to it by, and the key its deduplication is filed under.

    on?: string

    The domain event it reacts to.

    With it, nobody calls the notifier: a module emits what happened, and the notice that named that event says who learns about it. The module that emitted imports nothing and is never reopened when a channel is added.

    Needs the event bus listener to be enabled, since that is what delivers a domain event.