(canvas: ImageCacheCanvas)
| 16 | type Canvas2DContext = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D; |
| 17 | |
| 18 | function getCanvasContext(canvas: ImageCacheCanvas): Canvas2DContext | null { |
| 19 | return isOffscreenCanvas(canvas) ? canvas.getContext('2d') : canvas.getContext('2d'); |
| 20 | } |
| 21 | |
| 22 | function getFileCacheKey(file: File): string { |
| 23 | return `${file.name}:${file.size}:${file.lastModified}`; |
no test coverage detected