GeoLeaf Core API - v3.0.0
    Preparing search index...

    Lightweight notify primitive interface.

    Responsibilities:

    • Accept user-facing notification requests at any time (including before boot).
    • Buffer messages that arrive before a renderer is registered.
    • Forward messages to the active renderer once one is registered.
    • Fall back to console when no renderer is registered.
    interface INotifyPrimitive {
        notify(message: string, level?: NotifyLevel): void;
        registerRenderer(renderer: NotifyRenderer): void;
        unregisterRenderer(renderer?: NotifyRenderer): void;
        flush(): void;
    }
    Index

    Methods

    • Emits a user-facing notification.

      • If a renderer is registered: delegates immediately.
      • If no renderer yet: buffers the message and logs a console fallback.

      Parameters

      • message: string

        Text to display.

      • Optionallevel: NotifyLevel

        Severity level (default: "info").

      Returns void

    • Detaches the active renderer, returning the primitive to its pre-boot behaviour (buffer + console fallback). A renderer that is torn down MUST call this, or the primitive keeps handing messages to a dead renderer that silently drops them — and the console fallback never fires, because the primitive believes it still has somewhere to render.

      Parameters

      • Optionalrenderer: NotifyRenderer

        The renderer to detach. Passing the one currently registered clears it; passing any other value is a no-op, so a late teardown cannot unregister a renderer that replaced it in the meantime. Omit the argument to clear unconditionally.

      Returns void

    • Drains the internal queue, forwarding each buffered message to the currently registered renderer. No-op if no renderer is registered.

      Returns void