File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
core/src/main/scala/japgolly/scalajs/react Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import scala.annotation.tailrec
88import scala .concurrent .{duration => scd }
99import scala .reflect .ClassTag
1010import scala .scalajs .LinkingInfo .productionMode
11+ import scala .scalajs .js .timers .{SetIntervalHandle , SetTimeoutHandle }
1112import scala .scalajs .js .{Date => JsDate }
1213
1314/**
@@ -315,6 +316,18 @@ object Reusability extends ScalaVersionSpecificReusability {
315316 implicit def box [A : Reusability ]: Reusability [Box [A ]] =
316317 by(_.unbox)
317318
319+ implicit lazy val setIntervalHandle : Reusability [SetIntervalHandle ] =
320+ by_==
321+
322+ implicit lazy val setTimeoutHandle : Reusability [SetTimeoutHandle ] =
323+ by_==
324+
325+ implicit lazy val callbackSetIntervalResult : Reusability [Callback .SetIntervalResult ] =
326+ byRef || by(_.handle)
327+
328+ implicit lazy val callbackSetTimeoutResult : Reusability [Callback .SetTimeoutResult ] =
329+ byRef || by(_.handle)
330+
318331 // java.time._
319332
320333 implicit def clock : Reusability [Clock ] =
Original file line number Diff line number Diff line change 1+ # 1.7.3
2+
3+ * Add implicit ` Reusability ` instances for:
4+ * ` SetIntervalHandle `
5+ * ` SetTimeoutHandle `
6+ * ` Callback.SetIntervalResult `
7+ * ` Callback.SetTimeoutResult `
You can’t perform that action at this time.
0 commit comments