chore: Add types to the DITHERING_ALGORITHMS values

This commit is contained in:
wilson 2026-03-09 22:18:35 +00:00
parent 1d24bde610
commit b798a7062a

View file

@ -4,10 +4,10 @@
import { onMount } from 'svelte'; import { onMount } from 'svelte';
const DITHERING_ALGORITHMS = { const DITHERING_ALGORITHMS = {
atkinson: (imageData) => Dither.atkinson(imageData), atkinson: (imageData: ImageData) => Dither.atkinson(imageData),
bayer: (imageData) => Dither.bayer(imageData, 170), bayer: (imageData: ImageData) => Dither.bayer(imageData, 170),
floydSteinberg: (imageData) => Dither.floydsteinberg(imageData), floydSteinberg: (imageData: ImageData) => Dither.floydsteinberg(imageData),
threshold: (imageData) => Dither.threshold(imageData, 2), threshold: (imageData: ImageData) => Dither.threshold(imageData, 2),
} }
let canvas: HTMLCanvasElement; let canvas: HTMLCanvasElement;