Fray Electron
    Preparing search index...

    Variable consoleHubConst

    consoleHub: {
        apply(entry: ConsoleCommand): void;
        removeProject(project: string): void;
        reopenProject(openingTag: string, project: string): void;
        reset(): void;
        seed(entry: ConsoleCommand): void;
        seedReceipt(uid: string): void;
        snapshot(): { entries: readonly ConsoleCommand[] };
        subscribe(listener: Listener): () => void;
    } = ...

    Shared store of Console command entries.

    Type Declaration

    • apply: function
      • Applies an add or an update from the Engine. An entry that is unknown is added as reported, so a dropped add is recovered by the update that follows. An entry whose revision is not newer than the one held is ignored.

        Parameters

        Returns void

        Updates the snapshot and notifies subscribers when something changed.

    • removeProject: function
      • Drops a closed project's entries from the list; they stay in the disk log.

        Parameters

        • project: string

          Stable project id.

        Returns void

        Removes the entries, ignores later ones for the project until it opens again, and notifies subscribers.

    • reopenProject: function
      • Accepts entries for a project again once it opens, and relabels entries made while it was opening.

        Parameters

        • openingTag: string

          Temporary tag the project's entries carried while it opened.

        • project: string

          Stable project id.

        Returns void

        May replace entries and notify subscribers.

    • reset: function
    • seed: function
      • Rebuilds an entry from a persisted command row. Anything the Engine already reported live is kept as it is.

        Parameters

        Returns void

        Adds the entry and notifies subscribers when the uid is new.

    • seedReceipt: function
      • Records a persisted receipt row. An entry rebuilt from history is marked received; one the Engine reports live is left to its own updates.

        Parameters

        • uid: string

          Uid of the command the receipt confirms.

        Returns void

        May replace the entry and notify subscribers.

    • snapshot: function
    • subscribe: function
      • Registers a change listener.

        Parameters

        • listener: Listener

          Callback invoked after changes.

        Returns () => void

        Unsubscribe function.