EventSource
Import from: @xbbg/xnews
Defined in: src/types.ts (declaration: types.d.ts:391)
Binds one active-state publisher to its transport. Built-in providers export factories returning sources (see nwsAlertsSource); consumers can implement EventSource for their own publishers and reuse the lane.
Type Parameters
Provider
Provider extends string = BuiltInEventProvider
Properties
dataset
readonlydataset:string
Defined in: src/types.ts (declaration: types.d.ts:393)
provider
readonlyprovider:Provider
Defined in: src/types.ts (declaration: types.d.ts:392)
Methods
fetchSnapshot()
fetchSnapshot(
options?):Promise<EventSnapshot<Provider>>
Defined in: src/types.ts (declaration: types.d.ts:397)
Resolves undefined when the publisher currently reports nothing active.
Parameters
options?
Returns
Promise<EventSnapshot<Provider>>
requestUrls()
requestUrls(
options?): readonlystring[]
Defined in: src/types.ts (declaration: types.d.ts:395)
URLs the next fetchSnapshot call would dial, for observability.
Parameters
options?
Returns
readonly string[]
