Skip to main content
Version: 4.3

PaperEventHandler

type PaperEventHandler<T> = NonNullable<PaperEventHandlers[T]>;

The handler signature for a single paper event, looked up by its camelCase name. For example PaperEventHandler<'onCellPointerDown'> resolves to (params: PointerCellEventParams) => void. Handy for typing a standalone handler before adding it to a PaperEventMap.

Type Parameters

Type ParameterDescription
T extends keyof PaperEventHandlersThe event key to look up (a camelCase on* key of the paper's React event handlers, see PaperEventMap).

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub