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, ) => {