From 19292b5165a5e3349e5401676f7a9510be141a58 Mon Sep 17 00:00:00 2001 From: situ2001 Date: Mon, 27 Oct 2025 22:58:23 +0800 Subject: [PATCH] Add comments for hooks options --- hooks/src/internal.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/src/internal.d.ts b/hooks/src/internal.d.ts index c51fc13a50..e2b9d6ddb0 100644 --- a/hooks/src/internal.d.ts +++ b/hooks/src/internal.d.ts @@ -13,9 +13,10 @@ export { PreactContext }; export interface Options extends PreactOptions { /** Attach a hook that is invoked before a vnode is diffed. */ _diff?(vnode: VNode): void; - diffed?(vnode: VNode): void; /** Attach a hook that is invoked before a vnode has rendered. */ _render?(vnode: VNode): void; + /** Attach a hook that is invoked after a vnode has rendered. */ + diffed?(vnode: VNode): void; /** Attach a hook that is invoked after a tree was mounted or was updated. */ _commit?(vnode: VNode, commitQueue: Component[]): void; _unmount?(vnode: VNode): void;