Repository navigation
Remove propTypes statics that break typings with @types/react@19 - #5973
Merged
Merged
Conversation
added 2 commits
October 28, 2026 14:15
The propTypes statics of the exported function components made the emitted .d.ts import 'prop-types'. @types/react@19 no longer depends on @types/prop-types, so consumers with skipLibCheck: false got TS7016. Their inner components (ComposerCore, ComposerWithStore) keep their propTypes and receive the same props; className and role are validated by BasicWebChat. React 19 ignores propTypes. Part of #5552
11 tasks
Eugene (OEvgeny)
marked this pull request as ready for review
October 28, 2026 23:05
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
Thomas Durnford (tdurnford)
as code owners
October 28, 2026 23:05
William Wong (compulim)
approved these changes
Oct 28, 2026
Eugene (OEvgeny)
pushed a commit
that referenced
this pull request
Oct 29, 2026
…o longer import prop-types (#5973)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Removed
ReactWebChat.propTypesandComposer.propTypes, fixing type errors with@types/react@19, related to #5552, in PR #5973, by @OEvgenyDescription
The
propTypesof the exportedComposer,ReactWebChatandFullComposermade the declarations importprop-types, whose types@types/react@19no longer installs. They are removed, like theirdefaultPropsin #5956.No new test: a consumer type check on
@types/react16, 18 and 19 now has no TS7016 and no new errors.Design
propTypeswith the same props; adding@types/prop-typestodependencieswould also work, but adds a dependency for types React 19 ignores.Specific Changes
apiComposer,componentComposerandReactWebChat,bundleFullComposer: removedpropTypesbundleFullComposer:childrenprop isreadonly.changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed