UNPKG
@minax/redux-hooks
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
Achieve Redux By React Hooks
github.com/minaxorg/redux-hooks
minaxorg/redux-hooks
@minax/redux-hooks
/
src
/
createReducerKey.ts
9 lines
(8 loc)
•
204 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
const
createReducerKey = <T>(
p
: T): { [key
in
keyof T]: key } => {
const
res
:
any
= {}
Object
.
keys
(p).
forEach
(
(
key
:
string
) =>
{ res[key] = key })
return
res }
export
default
createReducerKey