import { ObjectShorthandValue, ShorthandValue } from '../../types'; import { PopperShorthandProps } from './types'; export function partitionPopperPropsFromShorthand

( value: ShorthandValue

, ): [ShorthandValue

| ObjectShorthandValue

, PopperShorthandProps | undefined] { if (typeof value === 'object' && value !== null && !Array.isArray(value)) { const { popper, ...props } = value as ObjectShorthandValue

& { popper: PopperShorthandProps }; return [props as ObjectShorthandValue

, popper]; } return [value, {}]; }