typescript function type es6 code example Example 1: es6 functions const add = (n1, n2) => n1 + n2 Example 2: es6 module syntax es6 module syntax