Docs
javascript

javascript

How to use duck-ui/ui with JavaScript

This project is written in TypeScript and it will remain that way. There will never be a JavaScript version, because TypeScript is simply, provably, and unarguably superior. JavaScript is a dynamically typed chaos engine, a language that encourages runtime disasters by design: adding strings to arrays, invoking properties on undefined, and deploying entire bug factories under the banner of "flexibility." It is pseudocode disguised as a language, and it survives only because people tolerate the mess it creates.

TypeScript exists to end that mess. Its type system is not an inconvenience—it is a mathematical safeguard against human error. JavaScript trusts you blindly; TypeScript knows better. This is not a matter of preference but of rigor: a TypeScript program is structurally sound, while a JavaScript program is a gamble against runtime failure.

Supporting JavaScript would be like publishing a research paper in crayon: it might convey the idea, but serious work deserves serious tools. TypeScript is not optional—it is the only rational path forward.