Skip to content

API reference

Generated from the source with TypeDoc at build time — every exported symbol, with its signature and TSDoc. One page per package, following the dependency direction: diconfigcore, then the test harness, the observability starter and the three transport starters on top of core.

  • @btravstack/diPort, Provider, Module (Module.scoped, Module.forkScope), Context, and the type names the surface carries: AnyPort, ServiceOf, Scope, PortClass, PortClassOf, PortInstance, AnyModule, AnyProvider, Exportable, ScopedOptions.
  • @btravstack/configConfig (string, integer, port, pinned, object, provider), the Env port, the errors ConfigInvalid and ConfigFieldInvalid, and the types ConfigField, ConfigIssue, ConfigSchema, Environment.
  • @btravstack/core — one entry point: start, runMain, RuntimePort, RuntimeStartFailed, currentUnit, systemClock, stderrSink, and the types StartOptions, StartGate, RunningApp, ExitReport, TeardownError, DrainReport, Runtime, RuntimeHost, RunUnit, Serving, RuntimeInfoOf, UnitMeta, UnitRecord, UnitRegistry, UnitWork, Clock, Phase, KernelEvent, EventSink.
  • @btravstack/testingbootFixture, tapped, testRuntime, TestRuntimePort, createFakeClock, and the types Boot, BootDefaults, ServicesOf, TestRuntime, TestRuntimeInfo, SubmittedUnit, FakeClock.
  • @btravstack/observabilitytwo entry points. The main one: the Logger and LoggerConfig ports, createLogger, jsonSink, observability, logLevel, kernelEvents, LEVELS, and the types LoggerService, LoggerSettings, Level, Attributes, Line, Sink, ObservabilityOptions. The @btravstack/observability/pino subpath carries pinoSink alone, so pino stays an optional peer.
  • @btravstack/httpHttpModule, HttpRouter, http, the ports HttpRuntime and HttpConfig, and the types HttpModuleOptions, HttpOptions, HttpInfo.
  • @btravstack/temporalTemporalModule, TemporalActivities, temporal, the ports TemporalRuntime, TemporalConfig and TemporalConnection, the error TemporalUnreachable, and the types TemporalModuleOptions, TemporalOptions, TemporalInfo, WorkflowSource.
  • @btravstack/amqpAmqpModule, AmqpHandlers, amqp, the ports AmqpRuntime and AmqpConfig, and the types AmqpModuleOptions, AmqpOptions, AmqpInfo.

Looking for prose?

The generated pages document signatures. For what each package is for, with its install line and worked examples, read Packages and install and the hand-written reference under it; for why the surface is shaped this way, read Why start?.

The shape of the surface

An application imports from few places, and each import list stays short because operations hang off the values by convention — Module.scoped, Config.provider:

ts
import { Module, Port, Provider } from "@btravstack/di";
import { Config, Env } from "@btravstack/config";
import { runMain, start } from "@btravstack/core";
import { HttpModule, HttpRouter } from "@btravstack/http";

Scope is a type-only export of di, and PortClass, PortClassOf and PortInstance exist for declaration emit — a consumer that exports a port or a minted provider needs the emitter to be able to name its type — not for hand-written code. RuntimeInstance, RuntimeOf and RuntimeNeedsOf are internal to core and deliberately absent from its page. Everything else — the build pipeline, the lifecycle state machine, the unit registry's internals — is implementation detail, not exported.

Released under the MIT License.