import { WindowPosition } from '../components/Window' ; param transformStyle returns const extractPositionFromTransformStyle = ( transformStyle ) : WindowPosition => { const matched = transformStyle . matchAll ( /[0-9.]+/g ) ; try { return { x : Number ( matched . next ( ) . value [ 0 ] ) , y : Number ( matched . next ( ) . value [ 0 ] ) , } ; } catch { return { x : 0 , y : 0 } ; } } ; export default extractPositionFromTransformStyle ;