Back to Tsx

Generated helpers

notes/oxc-transform/generated-helpers.md

4.23.91.5 KB
Original Source

Generated helpers

The public API exposes Runtime and External helper modes; inline helpers are not implemented, and Runtime is the default (NAPI modes, loader modes). Runtime mode emits bare imports/requires from @oxc-project/runtime/helpers/*, while external mode emits babelHelpers.* references (path construction).

oxc-transform does not declare @oxc-project/runtime as a runtime dependency (manifest). Runtime-mode output therefore requires that package to resolve from the generated module.

Running-Node targets avoid helpers for already-supported syntax, but legacy decorators and resource-management lowering explicitly request decorate* and usingCtx helpers (decorators, resource management).