diff --git a/src/html-flip-book/index.tsx b/src/html-flip-book/index.tsx index 17ab95c..ac5ba89 100644 --- a/src/html-flip-book/index.tsx +++ b/src/html-flip-book/index.tsx @@ -17,8 +17,16 @@ interface IProps extends IFlipSetting, IEventProps { renderOnlyPageLengthChange?: boolean; } -const HTMLFlipBookForward = React.forwardRef( - (props: IProps, ref: React.MutableRefObject) => { +type RequiredProps = 'width' | 'height'; +type HTMLFlipBookProps = Partial> & + Required>; + +export type HTMLFlipBookHandle = { + pageFlip: () => PageFlip | undefined; +}; + +const HTMLFlipBookForward = React.forwardRef( + (props: HTMLFlipBookProps, ref: React.Ref) => { const htmlElementRef = useRef(null); const childRef = useRef([]); const pageFlip = useRef();