|
|
|
@ -50,7 +50,9 @@ const subscriber_queue = [];
|
|
|
|
* @param value initial value
|
|
|
|
* @param value initial value
|
|
|
|
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
|
|
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export function readable<T>(value: T, start: StartStopNotifier<T>): Readable<T> {
|
|
|
|
export function readable(): Readable<undefined>;
|
|
|
|
|
|
|
|
export function readable<T>(value: T, start: StartStopNotifier<T>): Readable<T>;
|
|
|
|
|
|
|
|
export function readable<T>(value?: T, start?: StartStopNotifier<T>): Readable<T> {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
subscribe: writable(value, start).subscribe
|
|
|
|
subscribe: writable(value, start).subscribe
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|