function round(number, resolution) {
  return Math.round(number * resolution) / resolution;
}
@typedef {import('./Types').ConnectionLike} ConnectionLike
@typedef {import('./Types').RootLike} RootLike
@typedef {import('./Types').ParentLike } ParentLike
@typedef {import('./Types').ShapeLike} ShapeLike

@typedef { {
  container?: HTMLElement;
  deferUpdate?: boolean;
  width?: number;
  height?: number;
  autoFocus?: boolean;
} } CanvasConfig
@typedef { {
  group: SVGElement;
  index: number;
  visible: boolean;
} } CanvasLayer
@typedef { {
  [key: string]: CanvasLayer;
} } CanvasLayers
@typedef { {
  rootElement: ShapeLike;
  layer: CanvasLayer;
} } CanvasPlane
@typedef { {
  scale: number;
  inner: Rect;
  outer: Dimensions;
} & Rect } CanvasViewbox

@typedef {import('./ElementRegistry').default} ElementRegistry
@typedef {import('./EventBus').default} EventBus
@typedef {import('./GraphicsFactory').default} GraphicsFactory

@typedef {import('../util/Types').Dimensions} Dimensions
@typedef {import('../util/Types').Point} Point
@typedef {import('../util/Types').Rect} Rect
@typedef {import('../util/Types').RectTRBL} RectTRBL
@typedef {import('../util/Types').ScrollDelta} ScrollDelta