@@ -2075,7 +2075,7 @@ declare module 'svelte/motion' {
2075
2075
* @param run subscription callback
2076
2076
* @param invalidate cleanup callback
2077
2077
*/
2078
- subscribe ( this : void , run : Subscriber < T > , invalidate ?: Invalidator < T > ) : Unsubscriber ;
2078
+ subscribe ( this : void , run : Subscriber < T > , invalidate ?: ( ) => void ) : Unsubscriber ;
2079
2079
}
2080
2080
interface SpringOpts {
2081
2081
stiffness ?: number ;
@@ -2096,8 +2096,6 @@ declare module 'svelte/motion' {
2096
2096
easing ?: ( t : number ) => number ;
2097
2097
interpolate ?: ( a : T , b : T ) => ( t : number ) => T ;
2098
2098
}
2099
- /** Cleanup logic callback. */
2100
- type Invalidator < T > = ( value ?: T ) => void ;
2101
2099
/**
2102
2100
* The spring function in Svelte creates a store whose value is animated, with a motion that simulates the behavior of a spring. This means when the value changes, instead of transitioning at a steady rate, it "bounces" like a spring would, depending on the physics parameters provided. This adds a level of realism to the transitions and can enhance the user experience.
2103
2101
*
@@ -2221,7 +2219,7 @@ declare module 'svelte/store' {
2221
2219
* @param run subscription callback
2222
2220
* @param invalidate cleanup callback
2223
2221
*/
2224
- subscribe ( this : void , run : Subscriber < T > , invalidate ?: Invalidator < T > ) : Unsubscriber ;
2222
+ subscribe ( this : void , run : Subscriber < T > , invalidate ?: ( ) => void ) : Unsubscriber ;
2225
2223
}
2226
2224
2227
2225
/** Writable interface for both updating and subscribing. */
@@ -2238,15 +2236,6 @@ declare module 'svelte/store' {
2238
2236
*/
2239
2237
update ( this : void , updater : Updater < T > ) : void ;
2240
2238
}
2241
- /** Cleanup logic callback. */
2242
- type Invalidator < T > = ( value ?: T ) => void ;
2243
-
2244
- /** One or more `Readable`s. */
2245
- type Stores = Readable < any > | [ Readable < any > , ...Array < Readable < any > > ] | Array < Readable < any > > ;
2246
-
2247
- /** One or more values from `Readable` stores. */
2248
- type StoresValues < T > =
2249
- T extends Readable < infer U > ? U : { [ K in keyof T ] : T [ K ] extends Readable < infer U > ? U : never } ;
2250
2239
/**
2251
2240
* Creates a `Readable` store that allows reading by subscription.
2252
2241
*
@@ -2288,6 +2277,12 @@ declare module 'svelte/store' {
2288
2277
* https://svelte.dev/docs/svelte-store#get
2289
2278
* */
2290
2279
export function get < T > ( store : Readable < T > ) : T ;
2280
+ /** One or more `Readable`s. */
2281
+ type Stores = Readable < any > | [ Readable < any > , ...Array < Readable < any > > ] | Array < Readable < any > > ;
2282
+
2283
+ /** One or more values from `Readable` stores. */
2284
+ type StoresValues < T > =
2285
+ T extends Readable < infer U > ? U : { [ K in keyof T ] : T [ K ] extends Readable < infer U > ? U : never } ;
2291
2286
2292
2287
export { Subscriber , Unsubscriber , Updater , StartStopNotifier , Readable , Writable } ;
2293
2288
}
0 commit comments