UNPKG

495 BTypeScriptView Raw
1import { EventStream } from "./observable";
2import { Event } from "./event";
3/**
4 Creates an EventStream that delivers the given
5 single value for the first subscriber. The stream will end immediately
6 after this value. You can also send an [`Bacon.Error`](#bacon-error) event instead of a
7 value: `Bacon.once(new Bacon.Error("fail"))`.
8
9 @param value the value or event to emit
10 @typeparam V Type of stream elements
11 */
12export default function once<V>(value: V | Event<V>): EventStream<V>;