Skip to content

Commit

Permalink
fix: fix readonly state from hook
Browse files Browse the repository at this point in the history
  • Loading branch information
macoley committed Apr 15, 2022
1 parent 9518a3d commit e336884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bit-about/state",
"version": "1.0.4",
"version": "1.1.0",
"description": "Tiny and powerfull state managment library.",
"author": "Gareneye",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { ContextListener, StateSelector } from './types'

type StateSelectorHook<State> = (<SelectedState>(
selector: StateSelector<State, SelectedState>
) => Readonly<SelectedState>) &
(() => Readonly<State>)
) => SelectedState) &
(() => State)

type StateSubscriber<State> = (listener: (state: State) => void) => {
unsubscribe: () => void
Expand Down

0 comments on commit e336884

Please sign in to comment.