/** * DimensionsProxy is a proxy for the react-native Dimensions module. It is responsible for * simulating Dimensions for the mock device while using the screens devtool. In order for * it to work this library must be imported near the root of the applications component * tree. */ import { ScaledSize } from 'react-native'; import { MockDeviceConfig } from './types'; declare type DimensionsEventHandler = ({ window, screen }: { window: ScaledSize; screen: ScaledSize; }) => void; declare class DimensionsProxy { private deviceConfig?; private changeListeners; setConfig: (config?: MockDeviceConfig | undefined) => void; getWindow: () => ScaledSize; get: (type: "screen" | "window") => ScaledSize; addEventListener: (type: "change", handler: DimensionsEventHandler) => void; removeEventListener: (type: "change", handler: DimensionsEventHandler) => void; emitChange: () => void; } declare const proxySingleton: DimensionsProxy; export default proxySingleton;