moderator-toolbox-nxg-for-reddit / modules/announcements/types

modules/announcements/types

Interfaces

AnnouncementNote

Defined in: extension/data/modules/announcements/types.ts:4

A single announcement note fetched from the wiki.

Properties

body

body: string

Defined in: extension/data/modules/announcements/types.ts:10

Plain-text body (1-3 sentences; no markdown).

buildTypes?

optional buildTypes?: ("stable" | "beta")[]

Defined in: extension/data/modules/announcements/types.ts:29

Optional allowlist of build types that should see this note. Omit to show on all builds. Dev is intentionally excluded - the display path is a no-op on dev builds, so a dev-targeted note could never show.

id

id: string

Defined in: extension/data/modules/announcements/types.ts:6

Stable slug used as the deduplication key in seenNotes.

linkLabel?

optional linkLabel?: string

Defined in: extension/data/modules/announcements/types.ts:23

Label for the link button. Defaults to “Read more”.

publishAt?

optional publishAt?: number

Defined in: extension/data/modules/announcements/types.ts:19

Go-live time as a Unix timestamp in epoch seconds. Serves three roles: it is the date shown under the headline, and the display gate - a note whose publishAt is in the future stays hidden on every client until then (client-side scheduling). Set automatically at publish time (now, or a chosen future time). Optional only for forward-compatibility; published notes always carry it.

title

title: string

Defined in: extension/data/modules/announcements/types.ts:8

Short headline shown as the popup title.


AnnouncementsWikiData

Defined in: extension/data/modules/announcements/types.ts:33

The wrapper object stored at the announcements wiki page.

Properties

notes

Defined in: extension/data/modules/announcements/types.ts:35

version

version: 1

Defined in: extension/data/modules/announcements/types.ts:34