This lesson has been retired.
Become a member
to unlock all features

    Configuring a New TypeScript Project

    John LindquistJohn Lindquist

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



    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson


    00:00 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.

    00:14 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.

    00:28 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.