com.raquo.airstream.timing
Members list
Type members
Classlikes
This stream emits the last event emitted by parent
, but only after intervalMs
has elapsed since parent
emitted the previous event.
This stream emits the last event emitted by parent
, but only after intervalMs
has elapsed since parent
emitted the previous event.
Essentially, this stream emits the parent's last event, but only once the parent stops emitting events for intervalMs
.
When stopped, this stream "forgets" about any pending events.
See also ThrottleStream
Attributes
- Supertypes
-
trait InternalTryObserver[A]trait InternalObserver[A]trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait InternalNextErrorObserver[A]trait InternalObserver[A]trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
This stream emits a value that the promise resolves with, even if the promise was already resolved.
This stream emits a value that the promise resolves with, even if the promise was already resolved.
This stream emits only once. If you want to remember the value, Use JsPromiseSignal instead.
Value parameters
- promise
-
Note: guarded against failures
Attributes
- Supertypes
-
trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
Value parameters
- next
-
(currentState => (nextState, nextIntervalMs) Note: guarded against exceptions. If
next
throws, stream will emit that error
Attributes
- Supertypes
-
trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
Note: This is generally supposed to be used only with streams as inputs. Make sure you know what you're doing if using signals.
Note: This is generally supposed to be used only with streams as inputs. Make sure you know what you're doing if using signals.
- if
parent
is a Signal, this stream mirrorsparent.changes
, notparent
. - if
after
is a Signal, this stream ignores its initial value
Attributes
- Supertypes
-
trait SyncObservable[A]trait InternalTryObserver[A]trait InternalObserver[A]trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all
ThrottleStream emits at most one event per intervalMs
.
ThrottleStream emits at most one event per intervalMs
.
- All events are emitted in a new transaction, after an async delay, even if the delay is zero ms
- Any incoming event is scheduled to be emitted as soon as possible, but no sooner than
intervalMs
after the last event that was actually emitted by the throttled stream - When an event is scheduled to be emitted, any event that was previously scheduled is cancelled (that's the nature of throttling, you only get at most one event within
intervalMs
) - Errors are propagated in the same manner
- Stopping the stream cancels scheduled events and makes it forget everything that happened before.
See also See also DebounceStream
Attributes
- Supertypes
-
trait InternalTryObserver[A]trait InternalObserver[A]trait WritableStream[A]trait WritableObservable[A]trait EventStream[A]trait EventSource[A]trait Observable[A]trait Namedtrait Source[A]class Objecttrait Matchableclass AnyShow all