File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ import call from '../utils/call';
55import useAutoRef from './useAutoRef' ;
66
77interface NoResult {
8- _noResult : string ;
8+ readonly _noResult : string ;
99}
1010
1111const isNoResult = < T > ( value : T | NoResult , noResult : NoResult ) : value is NoResult => {
12- return isObject ( value ) && '_noResult' in value && value . _noResult === noResult . _noResult ; //TODO just value === noResult ?
12+ return isObject ( value ) && '_noResult' in value && value === noResult ; //TODO just value === noResult ?
1313} ;
1414
1515type MemoFactory < R > = ( noResult : NoResult ) => R | NoResult ;
@@ -22,9 +22,9 @@ const createDebouncedMemoHook =
2222
2323 const debounceFunction = useRef (
2424 call ( ( ) => {
25- const actualNoResult : NoResult = {
25+ const actualNoResult : NoResult = Object . freeze ( {
2626 _noResult : v4 ( )
27- } ;
27+ } ) ;
2828
2929 return debounceFn ( ( ) => {
3030 const value = factoryRef . current ( actualNoResult ) ;
You can’t perform that action at this time.
0 commit comments