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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.