Skip to content

Commit

Permalink
Fix: Signal.now() scaladoc to fix doc warning
Browse files Browse the repository at this point in the history
  • Loading branch information
raquo committed Feb 28, 2024
1 parent f01513e commit b1ef93f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/com/raquo/airstream/core/Signal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait Signal[+A] extends Observable[A] with BaseObservable[Signal, A] with Signa

/** Get the signal's current value
*
* @throws the signal's error if its current value is an error
* @throws Throwable the error from the current value's Failure
*/
protected[airstream] def now(): A = tryNow().get

Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/com/raquo/airstream/state/StrictSignal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import scala.util.Try
*/
trait StrictSignal[+A] extends Signal[A] {

/** Get the signal's current value
*
* @throws Throwable the error from the current value's Failure
*/
override def now(): A = super.now()

abstract override def tryNow(): Try[A] = super.tryNow()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/raquo/airstream/state/Var.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ trait Var[A] extends SignalSource[A] with Sink[A] with Named {

@inline def tryNow(): Try[A] = signal.tryNow()

/** @throws Exception if currentValue is a Failure */
/** @throws Throwable if currentValue is a Failure */
@inline def now(): A = signal.now()

override def toObservable: Signal[A] = signal
Expand Down

0 comments on commit b1ef93f

Please sign in to comment.