⚠️ This lesson is retired and might contain outdated information.

Configuring a New TypeScript Project

John Lindquist
InstructorJohn Lindquist
Share this video with your friends

Social Share Links

Send Tweet
Published 8 years ago
Updated 5 years ago

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

[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.

egghead
egghead
~ 5 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today