import { Bounds, Shape } from "types" export default interface ShapeUtil { create(props: Partial): K getBounds(this: ShapeUtil, shape: K): Bounds hitTest(this: ShapeUtil, shape: K, test: number[]): boolean hitTestBounds(this: ShapeUtil, shape: K, bounds: Bounds): boolean rotate(this: ShapeUtil, shape: K): K translate(this: ShapeUtil, shape: K, delta: number[]): K scale(this: ShapeUtil, shape: K, scale: number): K stretch(this: ShapeUtil, shape: K, scaleX: number, scaleY: number): K render(this: ShapeUtil, shape: K): JSX.Element } export function createShape( shape: ShapeUtil ): ShapeUtil { return shape }