From e65169788f50ac97faf6f250d4bfe50e43aeb481 Mon Sep 17 00:00:00 2001 From: Afonso Jorge Ramos Date: Mon, 26 May 2025 19:30:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#72797=20fix:=20[re?= =?UTF-8?q?act-native-htmlview]=20support=20for=20React=2018.3=20by=20@afo?= =?UTF-8?q?nsojramos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/react-native-htmlview/index.d.ts | 8 ++++++-- .../react-native-htmlview/react-native-htmlview-tests.tsx | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/types/react-native-htmlview/index.d.ts b/types/react-native-htmlview/index.d.ts index db0f34e1339145..ddf418c5b8480b 100644 --- a/types/react-native-htmlview/index.d.ts +++ b/types/react-native-htmlview/index.d.ts @@ -1,4 +1,4 @@ -import { ComponentType, ReactNode } from "react"; +import { ComponentClass, ComponentType, ReactInstance, ReactNode } from "react"; import { ImageStyle, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from "react-native"; type Nullish = null | undefined; @@ -114,5 +114,9 @@ export type HTMLViewNodeRenderer = ( parent: HTMLViewNode | Nullish, ) => ReactNode; -declare const HTMLView: ComponentType; +declare const HTMLView: ComponentClass & { + refs?: { + [key: string]: ReactInstance; + }; +}; export default HTMLView; diff --git a/types/react-native-htmlview/react-native-htmlview-tests.tsx b/types/react-native-htmlview/react-native-htmlview-tests.tsx index 2084de6ba90501..794cf0526d9248 100644 --- a/types/react-native-htmlview/react-native-htmlview-tests.tsx +++ b/types/react-native-htmlview/react-native-htmlview-tests.tsx @@ -64,8 +64,8 @@ class Simple extends React.Component { const renderNode: HTMLViewProps["renderNode"] = ( node, - index, - siblings, + _index, + _siblings, parent, defaultRenderer, ) => {