From 6602ab5eb842707fb361835e38ae267b955e0bce Mon Sep 17 00:00:00 2001 From: Gerard Rovira Date: Tue, 16 Apr 2024 19:16:44 +0100 Subject: [PATCH] chore(@lexical/react): Refine useDecorators type (#5846) --- packages/lexical-react/src/shared/useDecorators.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(), );