diff --git a/typings/react-popper.d.ts b/typings/react-popper.d.ts index 34d8f82..846fd62 100644 --- a/typings/react-popper.d.ts +++ b/typings/react-popper.d.ts @@ -69,13 +69,15 @@ export class Popper extends React.Component< {} > {} +export type UsePopperOptions = Omit, 'modifiers'> & { + createPopper?: typeof PopperJS.createPopper; + modifiers?: ReadonlyArray>; +} + export function usePopper( referenceElement?: Element | PopperJS.VirtualElement | null, popperElement?: HTMLElement | null, - options?: Omit, 'modifiers'> & { - createPopper?: typeof PopperJS.createPopper; - modifiers?: ReadonlyArray>; - } + options?: UsePopperOptions ): { styles: { [key: string]: React.CSSProperties }; attributes: { [key: string]: { [key: string]: string } | undefined };