Types
Every public type in @triggery/core is exported from its top-level entrypoint. The most-asked-about ones get their own reference page; the rest are documented inline in packages/core/src/types.ts.
Top-level
Section titled “Top-level” TriggerSchema The generic input to createTrigger. Declares events, conditions and actions in one shape.
TriggerCtx The handler context: event, conditions, actions, check, signal, meta. The everything-bag a trigger handler receives.
RuntimeOptions Options accepted by createRuntime: inspector toggle, middleware chain, cascade depth, buffer size.
Middleware The seven-hook lifecycle interface for tracing, devtools, persistence, custom telemetry.
Other exported types
Section titled “Other exported types”These are stable but documented inline in source rather than on their own pages. Open the link to jump straight to the type definition.
| Type | Where |
|---|---|
Runtime | types.ts — the runtime instance returned by createRuntime |
Trigger<S> | types.ts — the value returned by createTrigger |
TriggerHandler<S, R> | types.ts — function signature of config.handler |
ConcurrencyStrategy | types.ts — 'take-latest' | 'take-every' | 'take-first' | 'queue' | 'exhaust' | 'sync' |
SchedulerStrategy | types.ts — 'microtask' | 'sync' |
CheckCtx<C> | types.ts — typed check.is / check.all / check.any |
MetaCtx | types.ts — triggerId, runId, cascadeId, scheduledAt |
TriggerInspectSnapshot | types.ts — one ring-buffer record |
FireContext / MatchContext / SkipContext / ActionContext / CascadeContext | types.ts — middleware hook payloads |
RegistrationToken | types.ts — returned by every runtime.register* |
EmptyRecord | types.ts — Record<string, never> for schemas with no actions/conditions |
EventMap<S> / ConditionMap<S> / ActionMap<S> | types.ts — schema sub-maps |
EventKey<S> / ConditionKey<S> / ActionKey<S> | types.ts — the union of names in each sub-map |
NamedHooks<S> | types.ts — output of createNamedHooks |
If you want a type documented on its own page, open an issue — they’re cheap to add.