import { RefObject, type Component, type MutableRefObject } from 'react'; import { type NativeMethods, type HostComponent } from 'react-native'; /** * Helper for useRef and requireNativeComponent: * @example * RNMBXCamera = requireNativeComponent('RNMBXCamera'); * const ref = useRef; * ... * */ export type NativeRefType

= MutableRefObject< (Component

& Readonly) | null >; /** * Helper for useRef and requireNativeComponent: * @example * RNMBXCamera = requireNativeComponent('RNMBXCamera'); * const ref = nativeRef(useRef */ export default function nativeRef

( c: RefObject | null>, ): MutableRefObject<(Component

& Readonly) | null> { return c as NativeRefType

; }