5 lessons I've learned from functional programming as a TypeScript developer