eventregistry - v11.0.0
    Preparing search index...

    Class RecentFeed<T>

    Both a one-shot poll and an endless feed over one GetRecent* query: await feed does a single getUpdates() (the 10.0.0 behaviour), for await (const item of feed) polls forever. Nothing is requested until one of the two is used. Cancel a feed with signal; the loop then throws the abort reason.

    Type Parameters

    • T = unknown

    Implements

    • Promise<T[]>
    • AsyncIterable<T>
    Index
    "[toStringTag]": "RecentFeed"
    • Returns AsyncIterator<T>

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • R = never

      Parameters

      • Optionalonrejected: ((reason: unknown) => R | PromiseLike<R>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<T[] | R>

      A Promise for the completion of the callback.

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optionalonfinally: (() => void) | null

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<T[]>

      A Promise for the completion of the callback.

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • R1 = T[]
      • R2 = never

      Parameters

      • Optionalonfulfilled: ((value: T[]) => R1 | PromiseLike<R1>) | null

        The callback to execute when the Promise is resolved.

      • Optionalonrejected: ((reason: unknown) => R2 | PromiseLike<R2>) | null

        The callback to execute when the Promise is rejected.

      Returns Promise<R1 | R2>

      A Promise for the completion of which ever callback is executed.