import type { TtscUnpluginOptions } from "./core/options"; /** * Register the ttsc transform as a Bun **runtime** plugin. * * The other `@ttsc/unplugin/*` adapters cover bundlers (`Bun.build`, Vite, * Webpack, …). This entry is the runtime counterpart: loading it registers the * same transform on Bun's module loader, so `bun run` / `bun test` apply ttsc * plugins (e.g. typia's `typia/lib/transform`) as files are imported, with no * bundling step. Wire it up once via a `bunfig.toml` preload entry — `preload = * ["@ttsc/unplugin/bun-register"]` — or imperatively with `import * "@ttsc/unplugin/bun-register"`. Options are read from the nearest * `tsconfig.json`, identical to the bundler adapters. * * The first call registers one loader. Calls before its first transformable * TypeScript load use last-call-wins and capture options by value, so an * explicit call right after importing this module replaces the preload defaults * without installing a shadowing loader. Entering the first such load locks * that snapshot synchronously. Later calls with a structurally identical value * are idempotent; a different value throws rather than pretending a resolved * loader changed configuration. * * @throws When called explicitly off the Bun runtime, when options are not * structured-cloneable, or when a different option value is supplied after * the first load. The auto-registration below stays silent off Bun so the * module is harmless to import from Node (tests, tooling). */ export declare function register(options?: TtscUnpluginOptions): void; export default register;