From b4c3b100bf05cf069b0f83257c52051d5989fde7 Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Fri, 4 Oct 2024 12:17:47 +0200 Subject: [PATCH] Formatting --- packages/reactivity-core/sync.ts | 2 +- packages/reactivity-core/watchDirty.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/reactivity-core/sync.ts b/packages/reactivity-core/sync.ts index e7a0ce9..138db76 100644 --- a/packages/reactivity-core/sync.ts +++ b/packages/reactivity-core/sync.ts @@ -65,7 +65,7 @@ export function syncEffect(callback: EffectCallback): CleanupHandle { * Note that `onInvalidate` will never be invoked more than once. * * @deprecated This function is no longer needed and will be removed in a future release. - * + * * @group Watching */ export function syncEffectOnce(callback: EffectCallback, onInvalidate: () => void): CleanupHandle { diff --git a/packages/reactivity-core/watchDirty.ts b/packages/reactivity-core/watchDirty.ts index a7e7cb4..86539b9 100644 --- a/packages/reactivity-core/watchDirty.ts +++ b/packages/reactivity-core/watchDirty.ts @@ -2,12 +2,12 @@ import { effect as rawEffect } from "@preact/signals-core"; import { CleanupHandle, ReadonlyReactive } from "./types"; /** - * **Experimental**. + * **Experimental**. * Notifies the given `callback` whenever the `signal` might have changed, * without recomputing the signal's current value. * * This is a difficult to use, low level API that can be used to build higher level abstractions. - * + * * Things to keep in mind when using this function: * The `callback` should be cheap to invoke (as a signal might change often) and it **must not** throw an exception. * It should also not make use of any reactive values. @@ -17,7 +17,10 @@ import { CleanupHandle, ReadonlyReactive } from "./types"; * * @group Watching */ -export function subtleWatchDirty(signal: ReadonlyReactive, callback: () => void): CleanupHandle { +export function subtleWatchDirty( + signal: ReadonlyReactive, + callback: () => void +): CleanupHandle { // Uses the effect's internals to track signal invalidations. // The effect body is only called once! // See https://github.com/preactjs/signals/issues/593#issuecomment-2349672856