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.
2 parents 627d837 + 4385ea8 commit 4823f83Copy full SHA for 4823f83
.changeset/quick-ladybugs-cry.md
@@ -0,0 +1,5 @@
1
+---
2
+"@preact/signals-core": patch
3
4
+
5
+Fix `.subscribe`'s TypeScript type
packages/core/src/index.ts
@@ -123,7 +123,7 @@ export class Signal<T = any> {
123
};
124
}
125
126
- subscribe(fn: (value: T) => () => void) {
+ subscribe(fn: (value: T) => void): () => void {
127
return effect(() => fn(this.value));
128
129
0 commit comments