@@ -120,19 +120,15 @@ export type UseSpringProps<DS extends object> = Merge<
120120 }
121121>
122122
123+ type OverwriteKeys < A , B > = { [ K in keyof A ] : K extends keyof B ? B [ K ] : A [ K ] } ;
124+
123125// there's a third value in the tuple but it's not public API (?)
124- export function useSpring < DS extends CSSProperties > (
125- values : UseSpringProps < DS & CSSProperties >
126- ) : AnimatedValue < ForwardedProps < DS > >
127- export function useSpring < DS extends CSSProperties > (
128- getProps : ( ) => UseSpringProps < DS & CSSProperties >
129- ) : [ AnimatedValue < ForwardedProps < DS > > , SetUpdateFn < DS > ]
130126export function useSpring < DS extends object > (
131- getProps : ( ) => UseSpringProps < DS >
132- ) : [ AnimatedValue < ForwardedProps < DS > > , SetUpdateFn < DS > ]
127+ values : UseSpringProps < Merge < DS , CSSProperties > >
128+ ) : AnimatedValue < ForwardedProps < OverwriteKeys < DS , CSSProperties > > >
133129export function useSpring < DS extends object > (
134- values : UseSpringProps < DS >
135- ) : AnimatedValue < ForwardedProps < DS > >
130+ getProps : ( ) => UseSpringProps < Merge < DS , CSSProperties > >
131+ ) : [ AnimatedValue < ForwardedProps < OverwriteKeys < DS , CSSProperties > > > , SetUpdateFn < OverwriteKeys < DS , CSSProperties > > ]
136132
137133// there's a third value in the tuple but it's not public API (?)
138134export function useSprings < TItem , DS extends CSSProperties > (
0 commit comments