Skip to content

Commit

Permalink
utility is not public api
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyzanowskim committed Dec 29, 2024
1 parent c0c4ca3 commit 373ed6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
import Foundation

/// Options for debouncing an operation.
public enum DebounceOptions {
package enum DebounceOptions {
/// The default debounce behavior.
case `default`
/// Run the operation immediately and debounce subsequent calls.
case runFirst
}

/// Options for throttling an operation.
public enum ThrottleOptions {
package enum ThrottleOptions {
/// The default throttle behavior.
case `default`
/// Guarantee that the last call is executed even if it's after the throttle time.
case ensureLast
}

public enum ActorType {
package enum ActorType {
case currentActor
case mainActor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import Foundation
- DebounceOptions: Enum that defines various options for controlling debounce behavior.
*/

public func debounce(
package func debounce(
_ duration: TimeInterval = 1.0,
identifier: String = "\(Thread.callStackSymbols)",
by `actor`: ActorType = .mainActor,
Expand Down
2 changes: 1 addition & 1 deletion Sources/STTextViewCommon/Utilities/Throttler/delay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Foundation
```
*/

public func delay(
package func delay(
_ duration: TimeInterval = 1.0,
by `actor`: ActorType = .mainActor,
operation: @escaping () -> Void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import Foundation

*/

public func throttle(
package func throttle(
_ duration: TimeInterval = 1.0,
identifier: String = "\(Thread.callStackSymbols)",
by `actor`: ActorType = .mainActor,
Expand Down

0 comments on commit 373ed6e

Please sign in to comment.