OCaml's type-driven programming discipline can help us build better TypeScript applications.
1. Use modules effectively to keep data and their behaviour close together.
2. Use discriminated unions (sum types) and exhaustive pattern matching to build robust programs that are pleasing to the eye and to the mind.