This lesson has been retired.

Save 45% for a limited time.

Get access to all courses and lessons on egghead today.

Autoplay

    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.

    typescriptTypeScript
    Code

    Code

    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
    Transcript

    Transcript

    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.

    Discuss

    Discuss