diff --git a/packages/lexical-react/src/LexicalContentEditable.tsx b/packages/lexical-react/src/LexicalContentEditable.tsx index 657ba4fed3a..0463ffb4a7a 100644 --- a/packages/lexical-react/src/LexicalContentEditable.tsx +++ b/packages/lexical-react/src/LexicalContentEditable.tsx @@ -15,7 +15,7 @@ import {forwardRef, Ref, useLayoutEffect, useState} from 'react'; import {ContentEditableElement} from './shared/LexicalContentEditableElement'; import {useCanShowPlaceholder} from './shared/useCanShowPlaceholder'; -export type Props = Omit & +export type ContentEditableProps = Omit & ( | { 'aria-placeholder'?: void; @@ -29,10 +29,19 @@ export type Props = Omit & } ); +/** + * @deprecated This type has been renamed to `ContentEditableProps` to provide a clearer and more descriptive name. + * For backward compatibility, this type is still exported as `Props`, but it is recommended to migrate to using `ContentEditableProps` instead. + * + * @note This alias is maintained for compatibility purposes but may be removed in future versions. + * Please update your codebase to use `ContentEditableProps` to ensure long-term maintainability. + */ +export type Props = ContentEditableProps; + export const ContentEditable = forwardRef(ContentEditableImpl); function ContentEditableImpl( - props: Props, + props: ContentEditableProps, ref: Ref, ): JSX.Element { const {placeholder, ...rest} = props;