UNPKG
@mcastiello/simple-store
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
A simple state manager that can store data via a reducer function.
@mcastiello/simple-store
/
dist
/
store.d.ts
3 lines
(2 loc)
•
288 B
TypeScript
View Raw
1
2
3
import
{
ActionsDefinitions
,
GenericState
,
Reducer
,
Store
}
from
"./types"
;
export
declare
const
createStore
: <
State
extends
GenericState
,
Definitions
extends
ActionsDefinitions
<keyof
Definitions
>>
(
reducer
:
Reducer
<
State
,
Definitions
>,
initialState
?:
State
) =>
Store
<
State
,
Definitions
>;