main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
321 bytes
|
Rev | Line | |
---|
[d565449] | 1 | declare type CreateMethods<M, T> = (state: T) => {
|
---|
| 2 | [P in keyof M]: (payload?: any) => T;
|
---|
| 3 | };
|
---|
| 4 | declare type WrappedMethods<M> = {
|
---|
| 5 | [P in keyof M]: (...payload: any) => void;
|
---|
| 6 | };
|
---|
| 7 | declare const useMethods: <M, T>(createMethods: CreateMethods<M, T>, initialState: T) => [T, WrappedMethods<M>];
|
---|
| 8 | export default useMethods;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.