Skip to content
Effect Days 2026 Get your ticket

SchemaJITCompiler

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 Added in v4.0.0 Source

Compilation

enable

Added in v4.0.0 Source

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