# EventSource

The `EventSource` class provides methods for monitoring signals.

## Properties

This module exposes no properties.

## Methods

| Method                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `select`                | <p><code>select(property: string): EventSource</code></p><p>Converts event source by selecting a property in the event object. Events without specified property are ignored.</p>                                                                                                                                                                                                                                                                               |
| `skip`                  | <p><code>skip(count: number): EventSource</code></p><p>Yields a filtered event source: the first <code>count</code> events from the original source are dropped, and subsequent ones signaled.</p>                                                                                                                                                                                                                                                              |
| `subscribe`             | <p><code>subscribe(callback: (event: mixed) => void): Subscription</code></p><p>Sets a callback for the event source. The callback will be invoked every time an event is emitted from this <code>EventSource</code>.</p><p><strong>See Also</strong>: <code>Subscription.unsubscribe</code>.</p><p><strong>Note</strong>: <code>subscribe</code> and <code>subscribeOnNext</code> functions are completely equivalent.</p>                                     |
| `subscribeOnNext`       | <p><code>subscribeOnNext(callback: (event: mixed) => void): Subscription</code></p><p>Sets a callback for the event source. The callback will be invoked every time an event is emitted from this <code>EventSource</code>.</p><p><strong>See Also</strong>: <code>Subscription.unsubscribe</code>.</p><p><strong>Note</strong>: <code>subscribe</code> and <code>subscribeOnNext</code> functions are completely equivalent.</p>                               |
| `subscribeWithSnapshot` | <p><code>subscribeWithSnapshot(snapshot: { \[name: string]: Signal}, callback: (event: mixed, snapshot: mixed) => void): Subscription</code></p><p>Sets a callback for the event source, similar to <code>Subscribe</code> function, but with additional <code>Snapshot</code> parameter. <code>Snapshot</code> is a dictionary of String/Bool/Scalar signals, which will be passed as JSON to the callback function using lastValue from requested signals</p> |
| `take`                  | <p><code>take(count: number): EventSource</code></p><p>Yields a filtered event source: the first <code>count</code> events from the original source are signaled, and subsequent ones ignored.</p>                                                                                                                                                                                                                                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/reactivemodule/eventsource.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
