1
- import { Readable } from '../store/public.js' ;
1
+ import { Readable , type Unsubscriber } from '../store/public.js' ;
2
2
import { SpringUpdateOpts , TweenedOptions , Updater , SpringOpts } from './private.js' ;
3
3
4
4
// TODO we do declaration merging here in order to not have a breaking change (renaming the Spring interface)
@@ -8,9 +8,13 @@ import { SpringUpdateOpts, TweenedOptions, Updater, SpringOpts } from './private
8
8
export interface Spring < T > extends Readable < T > {
9
9
set ( new_value : T , opts ?: SpringUpdateOpts ) : Promise < void > ;
10
10
/**
11
- * @deprecated Only exists on the Spring store
11
+ * @deprecated Only exists on the legacy `spring` store, not the `Spring` class
12
12
*/
13
13
update : ( fn : Updater < T > , opts ?: SpringUpdateOpts ) => Promise < void > ;
14
+ /**
15
+ * @deprecated Only exists on the legacy `spring` store, not the `Spring` class
16
+ */
17
+ subscribe ( fn : ( value : T ) => void ) : Unsubscriber ;
14
18
precision : number ;
15
19
damping : number ;
16
20
stiffness : number ;
@@ -65,12 +69,12 @@ export class Spring<T> {
65
69
stiffness : number ;
66
70
/**
67
71
* The end value of the spring.
68
- * This property only exists on the Spring class.
72
+ * This property only exists on the ` Spring` class, not the legacy `spring` store .
69
73
*/
70
74
target : T ;
71
75
/**
72
76
* The current value of the spring.
73
- * This property only exists on the Spring class.
77
+ * This property only exists on the ` Spring` class, not the legacy `spring` store .
74
78
*/
75
79
get current ( ) : T ;
76
80
}
0 commit comments