A few examples using TypeScript, a typed superset of JavaScript.