@@ -13,7 +13,7 @@ const subscriber_queue = [];
1313 * Creates a `Readable` store that allows reading by subscription.
1414 * @template T
1515 * @param {T } value initial value
16- * @param {import('./public.js').StartStopNotifier<T> } start
16+ * @param {import('./public.js').StartStopNotifier<T> } [ start]
1717 * @returns {import('./public.js').Readable<T> }
1818 */
1919export function readable ( value , start ) {
@@ -26,7 +26,7 @@ export function readable(value, start) {
2626 * Create a `Writable` store that allows both updating and reading by subscription.
2727 * @template T
2828 * @param {T } value initial value
29- * @param {import('./public.js').StartStopNotifier<T> } start
29+ * @param {import('./public.js').StartStopNotifier<T> } [ start]
3030 * @returns {import('./public.js').Writable<T> }
3131 */
3232export function writable ( value , start = noop ) {
@@ -56,16 +56,18 @@ export function writable(value, start = noop) {
5656 }
5757 }
5858 }
59+
5960 /**
6061 * @param {import('./public.js').Updater<T> } fn
6162 * @returns {void }
6263 */
6364 function update ( fn ) {
6465 set ( fn ( value ) ) ;
6566 }
67+
6668 /**
6769 * @param {import('./public.js').Subscriber<T> } run
68- * @param {import('./private.js').Invalidator<T> } invalidate
70+ * @param {import('./private.js').Invalidator<T> } [ invalidate]
6971 * @returns {import('./public.js').Unsubscriber }
7072 */
7173 function subscribe ( run , invalidate = noop ) {
@@ -95,7 +97,7 @@ export function writable(value, start = noop) {
9597 * @template T
9698 * @overload
9799 * @param {S } stores - input stores
98- * @param {(values: import('./public.js').StoresValues<S>, set: import('./public.js').Subscriber<T> , update: (fn: import('./public.js').Updater<T>) => void) => import('./public.js').Unsubscriber | void } fn - function callback that aggregates the values
100+ * @param {(values: import('./public.js').StoresValues<S>, set: (value: T) => void , update: (fn: import('./public.js').Updater<T>) => void) => import('./public.js').Unsubscriber | void } fn - function callback that aggregates the values
99101 * @param {T } [initial_value] - initial value
100102 * @returns {import('./public.js').Readable<T> }
101103 */
0 commit comments