File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { AnimationResult } from './types/animated'
1111import { matchProp , DEFAULT_PROPS } from './helpers'
1212import { PendingProps , SpringValue } from './SpringValue'
1313
14- export type AsyncResult < T = any > = Promise < AnimationResult < T > >
14+ export type AsyncResult < T = any > = Promise < Readonly < AnimationResult < T > > >
1515
1616export type RunAsyncProps < T = any > = unknown &
1717 Merge <
Original file line number Diff line number Diff line change @@ -27,17 +27,17 @@ export type OnStart<T = unknown> = (spring: SpringValue<T>) => void
2727export type OnChange < T = unknown > = ( value : T , source : SpringValue < T > ) => void
2828
2929/** Called once the animation comes to a halt */
30- export type OnRest < T = unknown > = ( result : AnimationResult < T > ) => void
30+ export type OnRest < T = unknown > = ( result : Readonly < AnimationResult < T > > ) => void
3131
3232/** The object passed to `onRest` props */
33- export type AnimationResult < T = any > = Readonly < {
33+ export type AnimationResult < T = any > = {
3434 value : T
3535 spring ?: SpringValue < T >
3636 /** When falsy, the animation did not reach its end value. */
3737 finished ?: boolean
3838 /** When true, the animation was cancelled before it could finish. */
3939 cancelled ?: boolean
40- } >
40+ }
4141
4242/** `SpringProps` without `to` or `from` */
4343export interface AnimationProps < P extends string = string > {
You can’t perform that action at this time.
0 commit comments