From b798a7062aae4aed606dcd62934c6f78ad70f2df Mon Sep 17 00:00:00 2001 From: wilson Date: Mon, 9 Mar 2026 22:18:35 +0000 Subject: [PATCH] chore: Add types to the DITHERING_ALGORITHMS values --- src/routes/dither/+page.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/dither/+page.svelte b/src/routes/dither/+page.svelte index 6d4542b..471ad8d 100644 --- a/src/routes/dither/+page.svelte +++ b/src/routes/dither/+page.svelte @@ -4,10 +4,10 @@ import { onMount } from 'svelte'; const DITHERING_ALGORITHMS = { - atkinson: (imageData) => Dither.atkinson(imageData), - bayer: (imageData) => Dither.bayer(imageData, 170), - floydSteinberg: (imageData) => Dither.floydsteinberg(imageData), - threshold: (imageData) => Dither.threshold(imageData, 2), + atkinson: (imageData: ImageData) => Dither.atkinson(imageData), + bayer: (imageData: ImageData) => Dither.bayer(imageData, 170), + floydSteinberg: (imageData: ImageData) => Dither.floydsteinberg(imageData), + threshold: (imageData: ImageData) => Dither.threshold(imageData, 2), } let canvas: HTMLCanvasElement;