Skip to content

Commit 078b6a0

Browse files
authored
type: replace React.RefAttributes => RefAttributes (#530)
1 parent e9900fa commit 078b6a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ref.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ export const supportRef = (nodeOrComponent: any): boolean => {
6060
return true;
6161
};
6262

63+
interface RefAttributes<T> extends React.Attributes {
64+
ref: React.Ref<T>;
65+
}
66+
6367
export const supportNodeRef = <T = any>(
6468
node: React.ReactNode,
65-
): node is React.ReactElement & React.RefAttributes<T> => {
69+
): node is React.ReactElement & RefAttributes<T> => {
6670
if (!isValidElement(node)) {
6771
return false;
6872
}

0 commit comments

Comments
 (0)