Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

twine / EventHandler

Interface: EventHandler โ€‹

Defined in: twine/src/core/events/types.ts:33

One registered handler: the metadata @On attached, plus the method it marked.

Properties โ€‹

detector โ€‹

readonly detector: Detector

Defined in: twine/src/core/events/types.ts:42


fn? โ€‹

readonly optional fn?: (c) => void

Defined in: twine/src/core/events/types.ts:45

The body, for handlers registered without a decorated method.

Parameters โ€‹

c โ€‹

FunctionContext

Returns โ€‹

void


group? โ€‹

readonly optional group?: string

Defined in: twine/src/core/events/types.ts:41

The folder an own body goes in. Defaults to the module's name.


method? โ€‹

readonly optional method?: string

Defined in: twine/src/core/events/types.ts:39

The handler's key: its latch id and what rearmEvents matches. The method name for decorated handlers, or a caller-chosen key when fn is set. Only latched handlers need one.


opts โ€‹

readonly opts: OnOptions

Defined in: twine/src/core/events/types.ts:43

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.