add readable overloads for empty initializer

pull/6293/head
Ignatius Bagus 5 years ago
parent d244540384
commit cab4ae267f
No known key found for this signature in database
GPG Key ID: 357C6674A45CC06B

@ -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
}; };

Loading…
Cancel
Save