react-clear-cache icon indicating copy to clipboard operation
react-clear-cache copied to clipboard

TypeScript support problems

Open FelipeAfonso opened this issue 5 years ago • 2 comments

Both useClearCache hook and ClearCache component is returning type errors while using latest TypeScript version. This is being caused by defaultProps and useClearCache requiring all its props to be inputed in order to be accepted. The probable solution would be to encapsulate defaultProps and useClearCache with Partial<>

FelipeAfonso avatar Jul 09 '20 00:07 FelipeAfonso

+1

MrRobz avatar Jul 11 '20 11:07 MrRobz

+1

TianyuHou avatar Oct 13 '20 20:10 TianyuHou