mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-18 16:02:57 +00:00
11 lines
269 B
TypeScript
11 lines
269 B
TypeScript
import { Observable } from "rxjs";
|
|
import type { Readable } from "svelte/store";
|
|
|
|
export function fromReadable<T>(store: Readable<T>): Observable<T> {
|
|
return new Observable((subscriber) =>
|
|
store.subscribe((value) => {
|
|
subscriber.next(value);
|
|
}),
|
|
);
|
|
}
|