Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 41a499b

Browse files
committed
removed readonly type from setters
1 parent 87a084a commit 41a499b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ class Rex<S> {
4545
private internalState!: Readonly<S>;
4646
private updateInternalState!: Dispatch<SetStateAction<S>>;
4747

48-
public get state(): Readonly<S> {
48+
public get state(): S {
4949
return this.internalState;
5050
}
5151

52-
public set state(value: Readonly<S>) {
52+
public set state(value: S) {
5353
[this.internalState, this.updateInternalState] = useState<S>(value);
5454
}
5555

0 commit comments

Comments
 (0)