import DevicePixelRatioSource from './DevicePixelRatioSource' ; export default class DevicePixelRatioWindowSource implements DevicePixelRatioSource { devicePixelRatio ( ) { if ( typeof window === 'undefined' || ! window || ! window . devicePixelRatio ) { return 1 ; } return window . devicePixelRatio ; } }