Skip to content

Commit

Permalink
WatchCallback returns void, not any
Browse files Browse the repository at this point in the history
This matches the [documentation](https://github.com/vuejs/docs/blob/fe96839c9fe1ce82150e5a4396235cb3d1fb76e2/src/api/reactivity-core.md?plain=1#L378-L382) and better expresses that the return value is (mostly) ignored.
  • Loading branch information
rotu authored Dec 11, 2024
1 parent 201936f commit 09e84ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/reactivity/src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export type WatchCallback<V = any, OV = any> = (
value: V,
oldValue: OV,
onCleanup: OnCleanup,
) => any
) => void

export type OnCleanup = (cleanupFn: () => void) => void

Expand Down

0 comments on commit 09e84ef

Please sign in to comment.