Commit 7452a5e 1 parent 613c6ed commit 7452a5e Copy full SHA for 7452a5e
File tree 5 files changed +6
-5
lines changed
docusaurus/src/client/exports
docusaurus-theme-common/src
docusaurus-theme-search-algolia/src/theme/SearchBar
5 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {useMutationObserver} from './useMutationObserver';
11
11
// Callback fires when the "hidden" attribute of a tabpanel changes
12
12
// See https://github.com/facebook/docusaurus/pull/7485
13
13
function useTabBecameVisibleCallback (
14
- codeBlockRef : RefObject < HTMLPreElement | null > ,
14
+ codeBlockRef : RefObject < HTMLPreElement > ,
15
15
callback : ( ) => void ,
16
16
) {
17
17
const [ hiddenTabElement , setHiddenTabElement ] = useState <
@@ -53,7 +53,7 @@ function useTabBecameVisibleCallback(
53
53
}
54
54
55
55
export function useCodeWordWrap ( ) : {
56
- readonly codeBlockRef : RefObject < HTMLPreElement | null > ;
56
+ readonly codeBlockRef : RefObject < HTMLPreElement > ;
57
57
readonly isEnabled : boolean ;
58
58
readonly isCodeScrollable : boolean ;
59
59
readonly toggle : ( ) => void ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export function useEvent<T extends (...args: never[]) => unknown>(
44
44
* Gets `value` from the last render.
45
45
*/
46
46
export function usePrevious < T > ( value : T ) : T | undefined {
47
- const ref = useRef < T > ( undefined ) ;
47
+ const ref = useRef < T > ( ) ;
48
48
49
49
useIsomorphicLayoutEffect ( ( ) => {
50
50
ref . current = value ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function useSkipToContent(): {
52
52
* so that keyboard navigators can instantly interact with the link and jump
53
53
* to content.
54
54
*/
55
- containerRef : React . RefObject < HTMLDivElement | null > ;
55
+ containerRef : React . RefObject < HTMLDivElement > ;
56
56
/**
57
57
* Callback fired when the skip to content link has been clicked.
58
58
* It will programmatically focus the main content.
Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ function DocSearch({
199
199
} ) ) ,
200
200
) . current ;
201
201
202
+ // @ts -expect-error: TODO fix lib issue after React 19, using JSX.Element
202
203
const resultsFooterComponent : DocSearchProps [ 'resultsFooterComponent' ] =
203
204
useMemo (
204
205
( ) =>
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ function Link(
100
100
101
101
const IOSupported = ExecutionEnvironment . canUseIntersectionObserver ;
102
102
103
- const ioRef = useRef < IntersectionObserver > ( undefined ) ;
103
+ const ioRef = useRef < IntersectionObserver > ( ) ;
104
104
105
105
const handleRef = ( el : HTMLAnchorElement | null ) => {
106
106
innerRef . current = el ;
You can’t perform that action at this time.
0 commit comments