I'm building a React component (EmailHeader) with Typescript and I'm trying to define its props types. It receives some props directly from the parent (EmailEditor), and on the Props type declaration I'm merging its own props with the ones it inherits, to keep them sync, like so:
export type EmailHeaderProps = Pick<EmailEditorProps, 'availableSenders'> &
Pick<EmailEditorProps['email'], 'sender' | 'recipients' | 'subject'> & {
// Own props are defined here
};
However, I'd like to override its TSDoc/JSDoc and add more specific information that the props from the parent don't need.
Is there any way that I can do this, while keeping the props in sync? Or do I have to abandon this idea and explicitly declare each property again with the custom TSDoc/JSDoc?