@epikodelabs/streamix / src/public-api / Scope
Interface: Scope<T>
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:207
Interface definition for a lifecycle scope execution context.
Type Parameters
T
T extends Record<string, any> = Record<string, any>
The raw factory return type. The proxy exposes unwrapped atom values and uses T to infer the shape of snapshot().
Properties
type
type:
"scope"
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:209
Unique discriminator for the runtime context.
atoms
atoms:
Set<Atom<any> |Scope<Record<string,any>>>
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:211
State container for active elements captured by this window.
cleanups
cleanups:
Set<() =>void>
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:213
Registered callbacks triggered when this context collapses.
mode
mode:
"discrete"|"analog"
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:215
Scope mode: 'discrete' or 'analog'
parent
parent:
Scope<Record<string,any>> |RootScope|null
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:217
Parent scope reference
container
container:
Container
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:219
IoC container for this scope. Inherits from the parent scope's container.
loading
loading:
boolean
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:225
Whether the scope is still loading. True until every owned atom (and nested scope) has emitted at least one value. Exposed as a plain boolean via the proxy; the underlying atom lives in _rawState.
Methods
snapshot()
snapshot():
UnwrapSnapshotValues<T>
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:227
Returns a plain object snapshot of all current atom values.
Returns
UnwrapSnapshotValues<T>
dispose()
dispose():
void
Defined in: projects/libraries/streamix/src/lib/atoms/scope.ts:229
Disposes the scope and all of its atoms.
Returns
void