• PostStreamState



animateScroll: boolean = false
description: string = ''

The description to render on the scrubber.

discussion: Discussion

The discussion to display the post stream for.

forceUpdateScrubber: boolean = false

When the page is scrolled, goToIndex is called, or the page is loaded, various listeners result in the scrubber being updated with a new position and values. However, if goToNumber is called, the scrubber will not be updated. Accordingly, we add logic to the scrubber's onupdate to update itself, but only when needed, as indicated by this property.

index: number = 0
loadNext: (() => void)

Type declaration

    • (): void
    • Returns void

loadPageTimeouts: Record<number, Timeout> = {}
loadPrevious: (() => void)

Type declaration

    • (): void
    • Returns void

loadPromise: null | Promise<void> = null
needsScroll: boolean = false
number: number = 1
pagesLoading: number = 0
paused: boolean = false

Whether or not the infinite-scrolling auto-load functionality is disabled.

targetPost: null | {
    number: number;
} | {
    index: number;
    reply?: boolean;
} = null

Type declaration

  • number: number

Type declaration

  • index: number
  • Optional reply?: boolean
visible: number = 1

The number of posts that are currently visible in the viewport.

visibleEnd: number = 0
visibleStart: number = 0
loadCount: number = 20

The number of posts to load per page.


  • Clear the stream and load posts near a certain index. A page of posts surrounding the given index will be loaded. Returns a promise. If the given index is already loaded, the promise will be resolved immediately.


    • index: number

    Returns Promise<void>

  • Reset the stream so that a specific range of posts is displayed. If a range is not specified, the first page of posts will be displayed.


    • Optional start: number
    • Optional end: number

    Returns void

Generated using TypeDoc v0.24.8