> supports but ignores type annotations
That’s how TS works too though - compilation just strips the types via babel etc, with type checking a separate process. You opt in file by file by switching .js to .ts
That’s how TS works too though - compilation just strips the types via babel etc, with type checking a separate process. You opt in file by file by switching .js to .ts
I wonder what would happen if that proposal for type comments in JS went through. Would TypeScript become just a type checker / optimizing compiler?
Google's Closure had an (IMHO) nicer approach (using doc comments for type annotations, see: https://github.com/google/closure-compiler/wiki/Types-in-the...), but I don't get the impression it'll ever catch on outside Google.