export class Entity { constructor() {} async render(renderNode) {} async update(renderNode) {} } export class Sprite extends Entity { constructor(image) { if (!(image instanceof Image)) throw TypeError("Image has to be instance of `Image`"); } }