Ectype - bringing type safety (and more!) to vanilla JavaScript
summary
Claims a library + linter/type-checker pair that gives JavaScript static type-safety and runtime type introspection without compiling, with types represented as runtime values. Shows a runnable demo web server using from and conform, variants for errors, generics handled as value-level functions (with deferred cases), and JS interop via a JS unsafe wrapper. Notes trade-offs: added runtime objects, verbosity, limited syntax changes, and that the project is early but working enough to npm install.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 3:58JavaScript without transpilation
- 7:30Extending JavaScript syntax
- 8:53Live demo
- 11:44Primitive and compound types
- 12:47Variants and error handling
- 15:55Types as values
- 18:21Generics and deferred checking
- 21:29Conditional types and validation
- 23:57Integration with ecosystem
- 25:23Trade-offs and limitations
- 26:49Current state and future
related talks
21mThe long-tail of type safety
26mJavaScript Tools at Scale Using Type Information
55mHypeless TypeScript
01h 11mTypeScript: Static types for JavaScript
24mTypeScript for JavaScripties
31mTypeScript for JavaScripties
27mAdvanced TypeScript: elegant solutions to common problems
01h 01mAdvanced TypeScript Type Utilities
