Skip to main content

Builtins

Digital Alchemy Core provides several built-in services that are wired automatically before any library or application services run. They're always available on TServiceParams — no depends declaration needed.

Built-in services (on TServiceParams)​

ServiceTypeDescription
loggerGetLoggerContext-scoped logger
lifecycleTLifecycleBaseLifecycle hook registration
configTInjectedConfigTyped configuration object
schedulerTSchedulerCron, interval, and timeout scheduling
eventEventEmitterApp-wide event bus
alsAlsExtensionAsync Local Storage
internalInternalDefinitionUtilities and boot metadata

These are part of the boilerplate module, which always wires first. They live at config.boilerplate.* for configuration and are wired in this order: als → configuration → logger → scheduler.

Standalone exports​

These utilities are exported directly from @digital-alchemy/core and imported at the module level — they don't appear on TServiceParams.

ExportDescription
isType guard singleton
sleepAsync sleep with cancel support
debounceIdentifier-keyed debounce
eachParallel Promise.all over array/Set
eachSeriesSequential iteration
eachLimitBounded-concurrency iteration
SECOND, MINUTE, HOUR, DAY, WEEKMillisecond constants
import { is, sleep, each, SECOND } from "@digital-alchemy/core";

See Utilities for detailed documentation on each.

See also​