Skip to content
On this page

TIMELINE

Properties

nowdebug

readonly now: Timestamp;

The current timestamp.

bolt Methods

bump

bump(cell): Timestamp;

Indicate that a particular cell has been updated, and return a new timestamp for that update.

cellMutableInternals

The internals for cell that was updated.

returnsTimestamp

The new timestamp.

update

update(reactive): void;

When a reactive’s dependencies might have changed, any renderables that depend on this reactive need to refresh their dependencies. If there are no renderers for this reactive value, does nothing.

Otherwise, each relevant renderable will unsubscribe from any stale dependencies and subscribe to any new dependencies.

For example, Formulas call this method after recomputing their value, which results in a possible change to their dependencies.

reactiveReactiveProtocol

The reactive whose dependencies might have changed.

on.changerenderer

on.change(input, ready): void;

Register a callback that will be called when the given reactive value changes.

Important: Do not interact with reactive values inside the ready function. Instead, use your framework’s scheduling mechanism to schedule the component that registered the change handler for rerender.

inputReactiveProtocol

The reactive value whose changes will be monitored.

ready() => void

The callback to call when the reactive value changes.

attach

attach(notify, options?): DebugListener;

Attach a listener to the timeline.

notify() => void

The function to call when the timeline changes.

options.filterDebugFilter

A filter that determines which events trigger the notification function.

returnsDebugListener

mutation

T

The return value of the mutation function

mutation(description, callback): T;

Mutate multiple cells in the context of a named abstraction.

descriptionstring

A description of the mutation.

callback() => T

A function that mutates multiple cells.

returnsT

The return value of the mutation function.

untrackedReadBarrierdebug, renderer

untrackedReadBarrier(assertion): void;

In debug mode, register a barrier for untracked reads. This allows you to throw an error if an untracked read occurred in a context (such as a render function) that a renderer knows will produce rendered content.

assertion(reactive: ReactiveProtocol, caller: Stack) => void

A function that will be called in debug mode for each untracked read.,.

DebugFilter

Variants

by-reactive

{ type: "by-reactive", reactive: ReactiveProtocol }

Filter notifications by whether the entry is related to a particular reactive value.

all

{ type: "all" }

Notify the notifier for all entries.

none

{ type: "none" }

Don’t notify the notifier for any reason.

DebugOperation

Variants

cell:consume

{ type: "cell:consume", for: MutableInternals }

A cell was consumed.

frame:consume

{ type: "frame:consume", for: CompositeInternals }

A frame was consumed.

cell:update

{ type: "cell:update", entry: DebugEntry }

A cell was updated.

DebugListener

bolt Methods

update

update(filter): void;
filterDebugFilter

A new filter for this listener.

flush

flush(): DebugOperation[];

Flush the listener’s buffer.

returnsDebugOperation[]

Released under the MIT license