fix: typing get svelte/store (#5483)

pull/5484/head
Bob Fanger 4 years ago committed by GitHub
parent 324f74b427
commit 3fa15b9688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,7 +62,7 @@ export function subscribe(store, ...callbacks) {
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; 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; let value;
subscribe(store, _ => value = _)(); subscribe(store, _ => value = _)();
return value; return value;

Loading…
Cancel
Save