Back to Tsx

Function identity

notes/oxc-transform/function-identity.md

4.23.91.4 KB
Original Source

Function identity

The Oxc NAPI transform exposes syntax/target options without enabling the minifier or mangler (NAPI options, compiler defaults); its TypeScript pass removes or lowers TypeScript constructs (transform).

Oxc's keepNames behavior belongs to its mangler and preserves function/class name properties by excluding collected symbols from renaming (collection, exclusion).

Target lowering can create root-scope dependencies (generated helpers); async lowering emits a caller that closes over a generated wrapper variable (lowering). Inference: serializing only the lowered function cannot retain bindings left in the original program scope.