Closed remcohaszing closed 4 months ago
Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/*
labels.
The second commit was needed, because apparently type-coverage
started failing.
It was likely possible to side-step that with less changes: It didn’t get ReturnType<typeof Markdown>
, for some reason, presumably JSX.Element
, ReactNode
, ReactElement
, would’ve worked. Or a comment to ignore that one line?
Initial checklist
Description of changes
This makes the
react-markdown
types compatible with React 19. Dependencies still rely on theJSX
namespace, but let’s trackle one thing at a time.The better return type would be
ReactNode
, notReactElement
. But that breaks compatibility with TypeScript < 5.1. Let’s do that in a semver major.