SchedulableSystem
Defined in: src/scheduler.ts:7
Contract for a system that can be scheduled with dependency ordering.
Type Parameters
Section titled “Type Parameters”TCtx
Properties
Section titled “Properties”dispose?
Section titled “dispose?”
optionaldispose?: (ctx) =>void
Defined in: src/scheduler.ts:32
Optional teardown called by the scheduler after the system is removed.
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”void
optionalinit?: (ctx) =>void
Defined in: src/scheduler.ts:34
Optional one-time setup called by the scheduler before the system’s first run.
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”void
readonlyname:string
Defined in: src/scheduler.ts:8
phase?
Section titled “phase?”
readonlyoptionalphase?:string
Defined in: src/scheduler.ts:17
Optional phase name. When the scheduler has been constructed with a
non-empty phase list, every system MUST declare a phase from that list
and runAfter/runBefore references must stay within the same phase.
Phase names are declared per-scheduler by the app — the core ships no
defaults. A turn-based game might pick ['input','logic','render']; a
real-time one might pick ['input','physics','post-physics','render'].
reads?
Section titled “reads?”
readonlyoptionalreads?: readonlyComponentRef[]
Defined in: src/scheduler.ts:24
Components this system reads from. Informational in DEV mode: the
scheduler warns if a reader’s last writer in the sorted order is not
transitively reachable via runAfter/runBefore. No runtime effect
in production. Foundation for future parallel execution.
run: (
ctx) =>void
Defined in: src/scheduler.ts:35
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”void
runAfter?
Section titled “runAfter?”
readonlyoptionalrunAfter?: readonlystring[]
Defined in: src/scheduler.ts:26
Names of systems that must run before this one.
runBefore?
Section titled “runBefore?”
readonlyoptionalrunBefore?: readonlystring[]
Defined in: src/scheduler.ts:28
Names of systems that must run after this one.
runIf?
Section titled “runIf?”
readonlyoptionalrunIf?: (ctx) =>boolean
Defined in: src/scheduler.ts:42
Optional run condition, evaluated with the live ctx immediately before
each run — a system earlier in the same pass can change the verdict.
When it returns false the system is skipped for that pass. It does not
gate init, and it does not affect ordering or the DEV access check.
Parameters
Section titled “Parameters”TCtx
Returns
Section titled “Returns”boolean
writes?
Section titled “writes?”
readonlyoptionalwrites?: readonlyComponentRef[]
Defined in: src/scheduler.ts:30
Components this system writes to. See reads for semantics.