The complaint is that both `image.width` and `image.height` have type `number|string` whereas a `number` is required. This is logical because `image` can be one of several types (`HTMLCanvasElement|HTMLVideoElement|Image`) and you can do things like `image.width = '100%'`.

I'll fix this issue with an assert instead.