diff --git a/packages/lexical-react/src/shared/useDecorators.tsx b/packages/lexical-react/src/shared/useDecorators.tsx index a5892ece595..e3c5a0715c5 100644 --- a/packages/lexical-react/src/shared/useDecorators.tsx +++ b/packages/lexical-react/src/shared/useDecorators.tsx @@ -6,7 +6,7 @@ * */ -import type {LexicalEditor} from 'lexical'; +import type {LexicalEditor, NodeKey} from 'lexical'; import {Suspense, useEffect, useMemo, useState} from 'react'; import * as React from 'react'; @@ -26,7 +26,7 @@ export function useDecorators( editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType, ): Array { - const [decorators, setDecorators] = useState>( + const [decorators, setDecorators] = useState>( () => editor.getDecorators(), );