Download .ts

Download As from the toolbar.

Use Download As on the toolbar.

Goal

Log a typed summary.

interface Sale { city: string; units: number }
const rows: Sale[] = [
  { city: "Nairobi", units: 12 },
  { city: "Kisumu", units: 5 },
];
console.log(rows.reduce((a, r) => a + r.units, 0));
console.log("Download As → .ts from the toolbar");