import React from '../../src'; const MyInput: React.ForwardFn<{ id: string }, { focus(): void }> = ( props, ref ) => { const inputRef = React.useRef(null); React.useImperativeHandle(ref, () => ({ focus: () => { if (inputRef.current) { inputRef.current.focus(); } } })); return ; }; export const foo = React.forwardRef(MyInput); export const Bar = React.forwardRef( (props, ref) => { return
{props.children}
; } );