UNPKG

js-draw

Version:

Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript.

13 lines (12 loc) 369 B
import { InputEvt } from '../../inputEvents'; import InputMapper from './InputMapper'; /** * An `InputMapper` that applies a function to all events it receives. * * Useful for automated testing. */ export default class FunctionMapper extends InputMapper { private fn; constructor(fn: (event: InputEvt) => InputEvt); onEvent(event: InputEvt): boolean; }