Skip to content

Interface: Scope

Defined in: scope.ts:56

An instance qualifier for slice declarations. Create with scope; thread through a slice factory; pass as { scope } on control/action/ cell options and use the durable/durableSignal wrappers for the slice's internal keys.

Properties

name

readonly name: string

Defined in: scope.ts:58

The qualifier itself ("left", or nested "rig/left").

Methods

child()

child(leaf): Scope

Defined in: scope.ts:62

A nested scope: scope("rig").child("left")scope("rig/left").

Parameters

leaf

string

Returns

Scope


durable()

durable<T>(key, create): T

Defined in: scope.ts:64

A scope-qualified durable resource (key "left/history").

Type Parameters

T

T

Parameters

key

string

create

() => T

Returns

T


durableSignal()

durableSignal<T>(key, initial): SignalBox<T>

Defined in: scope.ts:66

A scope-qualified durable signal — the slice's internal (non-control) state.

Type Parameters

T

T

Parameters

key

string

initial

Exclude<T, Function>

Returns

SignalBox<T>


qualify()

qualify(leaf): string

Defined in: scope.ts:60

Qualified identity for a leaf name: qualify("freq")"left/freq".

Parameters

leaf

string

Returns

string