/**
 * ---- Common environment utility -------------------------------------------
 */ import { RectangleSize } from "./dataTypes" ; param id export const getElementOrBody = ( id ) : HTMLElement => document . getElementById ( id ) || document . body ; param node export const getElementSize = ( node ) : RectangleSize => node === document . body ? { width : window . innerWidth , height : window . innerHeight } : node . getBoundingClientRect ( ) ;