UNPKG

592 BTypeScriptView Raw
1import { EventStream } from "./observable";
2import { Event } from "./event";
3/**
4 Creates an EventStream that delivers the given
5 series of values (given as array) to the first subscriber. The stream ends after these
6 values have been delivered. You can also send [`Bacon.Error`](classes/error.html) events, or
7 any combination of pure values and error events like this:
8 `Bacon.fromArray([1, new Bacon.Error()])
9
10 @param values Array of values or events to repeat
11 @typeparam V Type of stream elements
12 */
13export default function fromArray<T>(values: (T | Event<T>)[]): EventStream<T>;