Adding TypeScript to our application

The starting point for our TypeScript—pretty much as always—is our tsconfig.json file. We are going to create this to be as slimline as possible. We are going to set this particular outDir here because the creation of our project set a number of files in wwwroot. In the wwwroot/js folder, ASP.NET has already created a site.js file, so we are going to target our script to live alongside it:

{  "compileOnSave": true,  "compilerOptions": {    "lib": [ "es2015", "dom" ],    "noImplicitAny": true,    "noEmitOnError": true,    "removeComments": true,    "sourceMap": true,    "target": "es2015",    "outDir": "wwwroot/js/"  },  "exclude": [    "wwwroot"  ]}

We are going to use a single method to call the Discogs API to retrieve the relevant ...

Get Advanced TypeScript Programming Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.