Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

SchemaJITCompiler unstable

Installs runtime-generated schema decoders without changing SchemaParser's public interface. Operations are compiled lazily. Import the separate SchemaJITCompiler/enable module to enable compilation globally.

1 exports Since v4.0.0 Source

Compilation

enable

unstable
Since v4.0.0

Enables lazy JIT compilation for an AST and its parsing dependencies.

Details

Uses the same registry as SchemaCompiler.set. Compilation failures, including environments that block new Function, retain interpreted parsing. Errors thrown while parsing are not retried. No checks, transformations or defaults execute during installation.

Gotchas

Enable before first use to optimize every consumer. Functions that already captured an entry keep it. Enable type-side and flipped ASTs separately when they differ from the supplied AST.

Signature

declare function enable(ast: AST): void