Skip to content

Welshman Docs / @welshman/domain / HighlightReader

Class: HighlightReader ​

Defined in: kinds/Highlight.ts:54

A reader whose event can be parsed without IO — the common case. parse() returns the reader itself, so callers never await it. Override parse to derive state from the event, returning this.

Extends ​

Constructors ​

Constructor ​

new HighlightReader(kind, context, event): HighlightReader

Defined in: core/EventReader.ts:21

Parameters ​

kind ​

number

context ​

KindContext

event ​

TrustedEvent

Returns ​

HighlightReader

Inherited from ​

EventReader.constructor

Properties ​

context ​

readonly context: KindContext

Defined in: core/EventReader.ts:23

Inherited from ​

EventReader.context


event ​

readonly event: TrustedEvent

Defined in: core/EventReader.ts:24

Inherited from ​

EventReader.event


kind ​

readonly kind: number

Defined in: core/EventReader.ts:22

Inherited from ​

EventReader.kind

Methods ​

address() ​

address(): string

Defined in: core/EventReader.ts:59

Returns ​

string

Inherited from ​

EventReader.address


attributions() ​

attributions(): HighlightAttribution[]

Defined in: kinds/Highlight.ts:79

Returns ​

HighlightAttribution[]


author() ​

author(): string

Defined in: core/EventReader.ts:39

Returns ​

string

Inherited from ​

EventReader.author


client() ​

client(): undefined | Client

Defined in: core/EventReader.ts:83

Returns ​

undefined | Client

Inherited from ​

EventReader.client


comment() ​

comment(): undefined | string

Defined in: kinds/Highlight.ts:94

Returns ​

undefined | string


content() ​

content(): string

Defined in: core/EventReader.ts:43

Returns ​

string

Inherited from ​

EventReader.content


contentWarning() ​

contentWarning(): boolean

Defined in: core/EventReader.ts:75

Returns ​

boolean

Inherited from ​

EventReader.contentWarning


contentWarningReason() ​

contentWarningReason(): undefined | string

Defined in: core/EventReader.ts:79

Returns ​

undefined | string

Inherited from ​

EventReader.contentWarningReason


createdAt() ​

createdAt(): number

Defined in: core/EventReader.ts:51

Returns ​

number

Inherited from ​

EventReader.createdAt


emojis() ​

emojis(): Emoji[]

Defined in: core/EventReader.ts:87

Returns ​

Emoji[]

Inherited from ​

EventReader.emojis


expiration() ​

expiration(): undefined | number

Defined in: core/EventReader.ts:71

Returns ​

undefined | number

Inherited from ​

EventReader.expiration


id() ​

id(): string

Defined in: core/EventReader.ts:35

Returns ​

string

Inherited from ​

EventReader.id


identifier() ​

identifier(): undefined | string

Defined in: core/EventReader.ts:55

Returns ​

undefined | string

Inherited from ​

EventReader.identifier


mentions() ​

mentions(): string[]

Defined in: kinds/Highlight.ts:85

Returns ​

string[]


parse() ​

parse(): this

Defined in: core/EventReader.ts:102

Returns ​

this

Inherited from ​

EventReader.parse


protect() ​

protect(): boolean

Defined in: core/EventReader.ts:67

Returns ​

boolean

Inherited from ​

EventReader.protect


references() ​

references(): string[]

Defined in: kinds/Highlight.ts:98

Returns ​

string[]


room() ​

room(): undefined | string

Defined in: core/EventReader.ts:63

Returns ​

undefined | string

Inherited from ​

EventReader.room


sourceContext() ​

sourceContext(): undefined | string

Defined in: kinds/Highlight.ts:90

Returns ​

undefined | string


sources() ​

sources(): HighlightSource[]

Defined in: kinds/Highlight.ts:55

Returns ​

HighlightSource[]


tags() ​

tags(): string[][]

Defined in: core/EventReader.ts:47

Returns ​

string[][]

Inherited from ​

EventReader.tags


topics() ​

topics(): string[]

Defined in: kinds/Highlight.ts:102

Returns ​

string[]


zapSplits() ​

zapSplits(): ZapSplit[]

Defined in: core/EventReader.ts:91

Returns ​

ZapSplit[]

Inherited from ​

EventReader.zapSplits