Skip to content

Commit ddeb884

Browse files
Fix: callback types in Animated
Signed-off-by: Akira Hayakawa <[email protected]>
1 parent 2721b6e commit ddeb884

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/scala/sri/universal/apis/Animated.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ trait AnimatedEndResult extends js.Object {
9696
trait CompositeAnimation extends js.Object {
9797
def stop(): Unit = js.native
9898

99-
def start(callback: AnimatedEndResult => _ = ???): Unit = js.native
99+
def start(callback: js.Function1[AnimatedEndResult, Any] = ???): Unit = js.native
100100
}
101101

102102
trait AnimatedConfig extends js.Object {
@@ -148,18 +148,18 @@ class AnimatedValue(value: Double) extends js.Object {
148148

149149
def extractOffset(): Unit = js.native
150150

151-
def addListener(callback: js.Dynamic => _): String = js.native
151+
def addListener(callback: js.Function1[js.Dynamic, Any]): String = js.native
152152

153153
def removeListener(id: String): Unit = js.native
154154

155155
def removeAllListeners(): Unit = js.native
156156

157-
def stopAnimation(callback: js.Dynamic => _ = ???): Unit = js.native
157+
def stopAnimation(callback: js.Function1[js.Dynamic, Any] = ???): Unit = js.native
158158

159159
def interpolate(config: AnimatedInterpolationConfig): AnimatedInterpolation =
160160
js.native
161161

162-
def animate(animation: Animation, callback: js.Dynamic => _): Unit =
162+
def animate(animation: Animation, callback: js.Function1[js.Dynamic, Any]): Unit =
163163
js.native
164164

165165
def stopTracking(): Unit = js.native
@@ -185,9 +185,9 @@ class AnimatedValueXY(valueIn: AnimatedValueXYValue = ???) extends js.Object {
185185

186186
def removeAllListeners(): Unit = js.native
187187

188-
def stopAnimation(callback: XYValueLiteral => _ = ???): Unit = js.native
188+
def stopAnimation(callback: js.Function1[XYValueLiteral, Any] = ???): Unit = js.native
189189

190-
def addListener(callback: XYValueLiteral => _): String = js.native
190+
def addListener(callback: js.Function1[XYValueLiteral, Any]): String = js.native
191191

192192
def removeListener(id: String): Unit = js.native
193193

0 commit comments

Comments
 (0)