Skip to content

Commit e651697

Browse files
authored
🤖 Merge PR DefinitelyTyped#72797 fix: [react-native-htmlview] support for React 18.3 by @afonsojramos
1 parent c96ac50 commit e651697

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎types/react-native-htmlview/index.d.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComponentType, ReactNode } from "react";
1+
import { ComponentClass, ComponentType, ReactInstance, ReactNode } from "react";
22
import { ImageStyle, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from "react-native";
33

44
type Nullish = null | undefined;
@@ -114,5 +114,9 @@ export type HTMLViewNodeRenderer = (
114114
parent: HTMLViewNode | Nullish,
115115
) => ReactNode;
116116

117-
declare const HTMLView: ComponentType<HTMLViewProps>;
117+
declare const HTMLView: ComponentClass<HTMLViewProps> & {
118+
refs?: {
119+
[key: string]: ReactInstance;
120+
};
121+
};
118122
export default HTMLView;

‎types/react-native-htmlview/react-native-htmlview-tests.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class Simple extends React.Component {
6464

6565
const renderNode: HTMLViewProps["renderNode"] = (
6666
node,
67-
index,
68-
siblings,
67+
_index,
68+
_siblings,
6969
parent,
7070
defaultRenderer,
7171
) => {

0 commit comments

Comments
 (0)