Skip to content

Commit

Permalink
fix: typing get svelte/store (#5483)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfanger authored Oct 1, 2020
1 parent 324f74b commit 3fa15b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/internal/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function subscribe(store, ...callbacks) {
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
}

export function get_store_value<T, S extends Readable<T>>(store: S): T {
export function get_store_value<T>(store: Readable<T>): T {
let value;
subscribe(store, _ => value = _)();
return value;
Expand Down

0 comments on commit 3fa15b9

Please sign in to comment.