Skip to content

Commit fe0a41f

Browse files
committed
chore: align types with @types/react@19
After deduping the lockfile, @types/react@* (transitive via @types/react-image-gallery) folded into the direct ^19.0.7 entry. React 19's types removed the global JSX namespace, so use React.JSX.IntrinsicElements instead. The @ts-expect-error in ModalGallery existed to suppress the @types/react 18<->19 mismatch with react-image-gallery; with both on 19, the suppression is unused.
1 parent 50bb987 commit fe0a41f

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/Gallery/ModalGallery.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const ModalGallery = (props: ModalGalleryProps) => {
4646
);
4747

4848
return (
49-
// @ts-expect-error ignore the TS error as react-image-gallery was on @types/react@18 while stream-chat-react being upgraded to React 19 (https://github.com/xiaolin/react-image-gallery/issues/809)
5049
<ImageGallery
5150
items={formattedArray}
5251
renderItem={renderItem}

src/components/Message/renderText/renderText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export type RenderTextPluginConfigurator = (
2424
) => PluggableList;
2525

2626
export const defaultAllowedTagNames: Array<
27-
keyof JSX.IntrinsicElements | 'emoji' | 'mention'
27+
keyof React.JSX.IntrinsicElements | 'emoji' | 'mention'
2828
> = [
2929
'html',
3030
'text',
@@ -89,7 +89,7 @@ export const markDownRenderers: RenderTextOptions['customMarkDownRenderers'] = {
8989

9090
export type RenderTextOptions = {
9191
allowedTagNames?: Array<
92-
keyof JSX.IntrinsicElements | 'emoji' | 'mention' | (string & {})
92+
keyof React.JSX.IntrinsicElements | 'emoji' | 'mention' | (string & {})
9393
>;
9494
customMarkDownRenderers?: Options['components'] &
9595
Partial<{

0 commit comments

Comments
 (0)