Preparing for system design interviews?  Try bugzed.com →

babel-plugin-jsdoc-to-assert

JSON →
library 4.0.0 ·javascript
verified Jun 17, 2026

A Babel plugin that converts JSDoc type annotations (@param and @type) into runtime assertion statements (console.assert) for testing. Version 4.0.0 is the current stable release, requiring Babel 7+. The plugin transforms static type documentation into executable checks, enabling runtime verification without a separate type system. Unlike TypeScript or Flow, it operates at the AST level during Babel transpilation and supports generic arrays (e.g., number[]) and rest parameters. Its primary differentiator is seamless integration into Babel workflows for development-only assertions, with options to enable/disable @param and @type checking. The package is maintained by azu and has a preset version (babel-preset-jsdoc-to-assert). Releases are infrequent, focusing on compatibility and bug fixes.

total hits 17
actors 4 distinct systems
last hit 16d ago AhrefsBot
ByteDance
5
GPTBot
4
Script
1
Humans
3

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · VN · 🇩🇪 Germany