We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62bed44 commit 587e702Copy full SHA for 587e702
.changeset/breezy-cherries-type.md
@@ -0,0 +1,5 @@
1
+---
2
+"@preact/signals-core": patch
3
4
+
5
+Loosen up types for `watched` and `unwatched`
packages/core/src/index.ts
@@ -273,8 +273,8 @@ declare class Signal<T = any> {
273
}
274
275
export interface SignalOptions<T = any> {
276
- watched: (this: Signal<T>) => void;
277
- unwatched: (this: Signal<T>) => void;
+ watched?: (this: Signal<T>) => void;
+ unwatched?: (this: Signal<T>) => void;
278
279
280
/** @internal */
0 commit comments