Skip to content

Commit 2226d04

Browse files
committed
Adjust ReadOnlySignal so we cant widen the type
1 parent 7494fb2 commit 2226d04

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/core/src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,15 @@ Object.defineProperty(Computed.prototype, "value", {
657657
/**
658658
* An interface for read-only signals.
659659
*/
660-
interface ReadonlySignal<T = any> extends Signal<T> {
660+
interface ReadonlySignal<T = any> {
661661
readonly value: T;
662+
peek(): T;
663+
664+
subscribe(fn: (value: T) => void): () => void;
665+
valueOf(): T;
666+
toString(): string;
667+
toJSON(): T;
668+
brand: typeof BRAND_SYMBOL;
662669
}
663670

664671
/**

0 commit comments

Comments
 (0)