Enter Your Email Address to Watch This Lesson

Your link to unlock this lesson will be sent to this email address.

Unlock this lesson and all 832 of the free egghead.io lessons, plus get TypeScript content delivered directly to your inbox!



Existing egghead members will not see this. Sign in.

Just one more step!

Check your inbox for an email from us and click link to unlock your lesson.



Configuring a New TypeScript Project

0:52 TypeScript lesson by

This lesson walks you through creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files.


egghead.io comment guidelines

Avatar
egghead.io

This lesson walks you through creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files.

To create a TypeScript configuration file, just tsc--emit, hit Enter, and you'll see it creates a tsconfig.json. You'll see that it was created over here. When I open it up, you'll see all the defaults that come with tsc.

Whereas before, we had to say tsc app.ts to compile app.ts, now this is all defined in here. Because this says exclude node modules, what that means is it's going to include everything else.

If I just say tsc, it's going to automatically find app.ts and compile it to app.js. If I create another file, like two.ts, put a class of two, hit Save and run tsc, this is also going to find that two.ts and compile it down as well as app.ts and compile that down.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?