@@ -10,17 +10,19 @@ import { useSprings } from './useSprings'
1010 * The props that `useSpring` recognizes.
1111 */
1212export type UseSpringProps < Props extends object = any > = unknown &
13- PickAnimated < Props > extends infer State extends Lookup < any >
14- ? Remap <
15- ControllerUpdate < State > & {
16- /**
17- * Used to access the imperative API.
18- *
19- * When defined, the render animation won't auto-start.
20- */
21- ref ?: SpringRef < State >
22- }
23- >
13+ PickAnimated < Props > extends infer State
14+ ? State extends Lookup
15+ ? Remap <
16+ ControllerUpdate < State > & {
17+ /**
18+ * Used to access the imperative API.
19+ *
20+ * When defined, the render animation won't auto-start.
21+ */
22+ ref ?: SpringRef < State >
23+ }
24+ >
25+ : never
2426 : never
2527
2628/**
@@ -32,8 +34,10 @@ export function useSpring<Props extends object>(
3234 | Function
3335 | ( ( ) => ( Props & Valid < Props , UseSpringProps < Props > > ) | UseSpringProps ) ,
3436 deps ?: readonly any [ ] | undefined
35- ) : PickAnimated < Props > extends infer State extends Lookup < any >
36- ? [ SpringValues < State > , SpringRef < State > ]
37+ ) : PickAnimated < Props > extends infer State
38+ ? State extends Lookup
39+ ? [ SpringValues < State > , SpringRef < State > ]
40+ : never
3741 : never
3842
3943/**
@@ -49,8 +53,10 @@ export function useSpring<Props extends object>(
4953export function useSpring < Props extends object > (
5054 props : ( Props & Valid < Props , UseSpringProps < Props > > ) | UseSpringProps ,
5155 deps : readonly any [ ] | undefined
52- ) : PickAnimated < Props > extends infer State extends Lookup < any >
53- ? [ SpringValues < State > , SpringRef < State > ]
56+ ) : PickAnimated < Props > extends infer State
57+ ? State extends Lookup
58+ ? [ SpringValues < State > , SpringRef < State > ]
59+ : never
5460 : never
5561
5662/** @internal */
0 commit comments