Skip to content

Commit 44d8369

Browse files
committed
fix circular dep
1 parent 9ffb300 commit 44d8369

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

packages/svelte/src/store/private.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ type SubscribeInvalidateTuple<T> = [Subscriber<T>, () => void];
66
/** One or more `Readable`s. */
77
type Stores = Readable<any> | [Readable<any>, ...Array<Readable<any>>] | Array<Readable<any>>;
88

9-
/** One or more values from `Readable` stores. */
10-
type StoresValues<T> =
11-
T extends Readable<infer U> ? U : { [K in keyof T]: T[K] extends Readable<infer U> ? U : never };
12-
13-
export { SubscribeInvalidateTuple, Stores, StoresValues };
9+
export { SubscribeInvalidateTuple, Stores };

packages/svelte/src/store/public.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,8 @@ export interface Writable<T> extends Readable<T> {
4646
update(this: void, updater: Updater<T>): void;
4747
}
4848

49-
export type { StoresValues } from './private';
49+
/** One or more values from `Readable` stores. */
50+
export type StoresValues<T> =
51+
T extends Readable<infer U> ? U : { [K in keyof T]: T[K] extends Readable<infer U> ? U : never };
52+
5053
export * from './index-client.js';

packages/svelte/src/store/shared/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
2-
/** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
1+
/** @import { Readable, StartStopNotifier, StoresValues, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
2+
/** @import { Stores, SubscribeInvalidateTuple } from '../private.js' */
33
import { noop, run_all } from '../../internal/shared/utils.js';
44
import { safe_not_equal } from '../../internal/client/reactivity/equality.js';
55
import { subscribe_to_store } from '../utils.js';

0 commit comments

Comments
 (0)