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

twine / on

Function: on() โ€‹

Call Signature โ€‹

on(instance, key, detector, fn, opts?): void

Defined in: twine/src/core/events/register.ts:84

Imperative On: runs fn when detector holds. See addEventHandler.

A latched handler needs a key, since its latch is saved in the world under it.

Parameters โ€‹

instance โ€‹

object

key โ€‹

string

detector โ€‹

Detector

fn โ€‹

(c) => void

opts? โ€‹

OnOptions

Returns โ€‹

void

Call Signature โ€‹

on(instance, detector, fn, opts): void

Defined in: twine/src/core/events/register.ts:91

Imperative On: runs fn when detector holds. See addEventHandler.

A latched handler needs a key, since its latch is saved in the world under it.

Parameters โ€‹

instance โ€‹

object

detector โ€‹

Detector

fn โ€‹

(c) => void

opts โ€‹

OnOptions & object

Returns โ€‹

void

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