3 ms·
Closure does static analysis too, the fact that the types are shoved in comments thus allowing the files to be used as-is in JS is more of a technical nuance no
by epolanski 3y ago
Closure does static analysis too, the fact that the types are shoved in comments thus allowing the files to be used as-is in JS is more of a technical nuance not different from the flow programming language by Facebook, or JSDoc-driven TypeScript.
- nikitaga 3y agoAh! Right, I forgot that using JSDoc-style comments for static type checking was a thing back then. Nowadays we just feed Scala.js output to Closure compiler for it to optimize and minify, it would be too painful to write such comment-centric code manually. But we didn't have that many good options back then.