functai for TypeScript - v0.1.0
    Preparing search index...

    Function flush

    • Wait until every observer has been given the events made so far, and every journal has tried to keep them: a writer still holding events a journal did not confirm sends them again now (at most timeout milliseconds in all; default 5,000). True when all of it was done in time and every journal confirmed every event it was sent (a journal that refused one, which it is sent nothing more, counts as done); false when time ran out, a journal still holds events it did not confirm, or a writer gave up on events for good since the previous flush() returned (or since the process began): each loss makes one flush() say false. For a process that is about to end, and for tests.

      Parameters

      • opts: { timeout?: number } = {}

      Returns Promise<boolean>