import type { Val1 } from "@thi.ng/api" ; import type { FloatBuffer } from "@thi.ng/pixel" ; export const SET_IMAGE = "set-image" ; export const UPDATE_IMAGE = "update-image" ; export const SET_KERNEL_WIDTH = "set-kernel-width" ; export const SET_KERNEL_OFFSET = "set-kernel-offset" ; export interface EventTypeMap { [ SET_IMAGE ] : [ typeof SET_IMAGE , File ] ; [ UPDATE_IMAGE ] : [ typeof UPDATE_IMAGE ] ; [ SET_KERNEL_WIDTH ] : [ typeof SET_KERNEL_WIDTH , number ] ; [ SET_KERNEL_OFFSET ] : [ typeof SET_KERNEL_OFFSET , number ] ; } export type EventType = keyof EventTypeMap ; export type Event = Val1 < EventTypeMap , EventType > ; export interface AppState { srcImg ? : FloatBuffer ; destImg ? : FloatBuffer ; threshold : { windowSize : number ; offset : number ; } ; }