order to • Capture invariants of the code • Ensure its correctness • Definitely exclude certain classes of programming errors. • Stricter typing rules at compile time • Errors and exceptions are more likely to happen during compilation. • Rules affect variable assignment, return values and function calling.
type origin in the files • Ability to auto complete according to the type origin • Ability to relate type to the file origin • Speeding up development in complex projects
And Flow require using a code transpilar • Typescript - tsc - from Typescript To JavaScript • Flow - babel - traspiles .js files to .js files with no types • The code that you run is not the code that you write
-> Source code is different from deployed code • Stack traces from production will appear on the deployed code • Without them - Impossible to debug • Need to use source maps to display stack traces from the original code • Crucial to analyse bugs on different environments (dev/ prod)