Skip to content

Runtime / node-macros: registerRuntimeMacros

Functions, types, and exports for Runtime / node-macros: registerRuntimeMacros.

Page outline

Executes t, plural, select, and selectOrdinal from @palamedes/core/macro at runtime through the active i18n instance.

Call this once per process, before translated code runs; a second call throws instead of replacing the manifest other modules rely on. It is meant for Node code that runs without a bundler (native type stripping, plain tsc output, scripts, and tests). Bundled code compiles macros away and must not register runtime macros.

import { registerRuntimeMacros } from "@palamedes/runtime/node-macros"

registerRuntimeMacros(manifest: RuntimeMacroManifest | URL | string): void

Parameters

NameTypeRequired
manifestRuntimeMacroManifest | URL | stringYes

Returns

void

Source entry on GitHub

Last updated: November 1, 2026