@@ -10,17 +10,19 @@ import { useSprings } from './useSprings'
10
10
* The props that `useSpring` recognizes.
11
11
*/
12
12
export 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
24
26
: never
25
27
26
28
/**
@@ -32,8 +34,10 @@ export function useSpring<Props extends object>(
32
34
| Function
33
35
| ( ( ) => ( Props & Valid < Props , UseSpringProps < Props > > ) | UseSpringProps ) ,
34
36
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
37
41
: never
38
42
39
43
/**
@@ -49,8 +53,10 @@ export function useSpring<Props extends object>(
49
53
export function useSpring < Props extends object > (
50
54
props : ( Props & Valid < Props , UseSpringProps < Props > > ) | UseSpringProps ,
51
55
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
54
60
: never
55
61
56
62
/** @internal */
0 commit comments