Improve and consolidate typing
This commit is contained in:
parent
829169ec87
commit
bd175c6f40
21 changed files with 186 additions and 257 deletions
|
@ -39,7 +39,7 @@ enum SpaceVisibility {
|
|||
|
||||
const useLocalEcho = <T extends any>(
|
||||
currentFactory: () => T,
|
||||
setterFn: (value: T) => Promise<void>,
|
||||
setterFn: (value: T) => Promise<any>,
|
||||
errorFn: (error: Error) => void,
|
||||
): [value: T, handler: (value: T) => void] => {
|
||||
const [value, setValue] = useState(currentFactory);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue