of
Source Location: packages/core/src/source.ts#L720
Signature
function of<T>(...items: T[]): Source<T>
Creates a Source from the given values.. The values will be synchronously emitted by the created source upon each subscription.
Returns
Type | Description | |
---|---|---|
| The created source. |
Example Usage
pipe(of(1, 2, 3, 4), subscribe(Sink(console.log))); // Logs: // Push(1), Push(2), Push(3), Push(4) // End
Example Usage
pipe(of(), subscribe(Sink(console.log))); // Logs: // End