source: imaps-frontend/node_modules/react-use/lib/useMethods.d.ts

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
Line 
1declare type CreateMethods<M, T> = (state: T) => {
2 [P in keyof M]: (payload?: any) => T;
3};
4declare type WrappedMethods<M> = {
5 [P in keyof M]: (...payload: any) => void;
6};
7declare const useMethods: <M, T>(createMethods: CreateMethods<M, T>, initialState: T) => [T, WrappedMethods<M>];
8export default useMethods;
Note: See TracBrowser for help on using the repository browser.