You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/SimplexArchitecture/SideEffect.swift
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,16 @@ public extension SideEffect {
122
122
}
123
123
124
124
publicextensionSideEffect{
125
+
/// Turns an side effect into one that can be debounced.
126
+
///
127
+
/// debounce is an operator that plays only the last event in a sequence of SideEffects that have been issued for more than a certain time interval.
128
+
/// To turn an effect into a debounce-able one you must provide an identifier, which is used to determine which in-flight effect should be canceled in order to start a new effect.
129
+
///
130
+
/// - Parameters:
131
+
/// - id: The effect's identifier.
132
+
/// - duration: The duration you want to debounce for.
133
+
/// - clock: A clock conforming to the `Clock` protocol, used to measure the passing of time for the debounce duration.
0 commit comments