Skip to content

Commit e336884

Browse files
committed
fix: fix readonly state from hook
1 parent 9518a3d commit e336884

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bit-about/state",
3-
"version": "1.0.4",
3+
"version": "1.1.0",
44
"description": "Tiny and powerfull state managment library.",
55
"author": "Gareneye",
66
"license": "MIT",

src/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { ContextListener, StateSelector } from './types'
66

77
type StateSelectorHook<State> = (<SelectedState>(
88
selector: StateSelector<State, SelectedState>
9-
) => Readonly<SelectedState>) &
10-
(() => Readonly<State>)
9+
) => SelectedState) &
10+
(() => State)
1111

1212
type StateSubscriber<State> = (listener: (state: State) => void) => {
1313
unsubscribe: () => void

0 commit comments

Comments
 (0)