Skip to content

Commit 93586dd

Browse files
committed
Correct typing error in SyncedRef.current property
This issue was not caught previously because the property is only written by JS code in the `preact` library.
1 parent d558251 commit 93586dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/use-synced-ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SyncedRef<T> implements RefObject<T> {
2323
return this._value;
2424
}
2525

26-
set current(value: null) {
26+
set current(value: T | null) {
2727
this._value = value;
2828
this._updateTarget();
2929
}

0 commit comments

Comments
 (0)