Setting up Typescript from scratch

📰 Medium · Programming

Learn to set up TypeScript from scratch for your project, avoiding common pitfalls and saving time

beginner Published 18 Apr 2026
Action Steps
  1. Create a new project folder to organize your work
  2. Run 'npm init -y' in your terminal to initialize the project
  3. Install TypeScript locally using 'npm install typescript' to set up the environment
  4. Configure your TypeScript project by creating a tsconfig.json file
  5. Start writing your TypeScript code and use the 'tsc' command to compile it
Who Needs to Know This

Developers, especially those new to TypeScript, can benefit from this guide to quickly set up their projects and start coding, ensuring their team's workflow is efficient and standardized

Key Insight

💡 Initializing a project with 'npm init -y' and installing TypeScript with 'npm install typescript' are crucial steps in setting up a TypeScript project

Share This
💡 Setting up #TypeScript from scratch? Follow these easy steps to get started quickly and avoid common pitfalls! #JavaScript #Development

Key Takeaways

Learn to set up TypeScript from scratch for your project, avoiding common pitfalls and saving time

Full Article

Title: Setting up Typescript from scratch

URL Source: https://medium.com/@sawgatchettri001/setting-up-typescript-from-scratch-c46e6ba8174c?source=rss------programming-5

Published Time: 2026-04-18T14:34:35Z

Markdown Content:
# Setting up Typescript from scratch | by Sawgatchettri | Apr, 2026 | Medium

[Sitemap](https://medium.com/sitemap/sitemap.xml)

[Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------)

Sign up

[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sawgatchettri001%2Fsetting-up-typescript-from-scratch-c46e6ba8174c&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

[](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------)

Get app

[Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------)

[Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------)

Sign up

[Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40sawgatchettri001%2Fsetting-up-typescript-from-scratch-c46e6ba8174c&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)

![Image 1](https://miro.medium.com/v2/resize:fill:64:64/1*dmbNkD5D-u45r44go_cf0g.png)

# _Setting up Typescript from scratch_

[![Image 2: Sawgatchettri](https://miro.medium.com/v2/resize:fill:64:64/1*A156345doMZSRWjRcXd1UA.jpeg)](https://medium.com/@sawgatchettri001?source=post_page---byline--c46e6ba8174c---------------------------------------)

[Sawgatchettri](https://medium.com/@sawgatchettri001?source=post_page---byline--c46e6ba8174c---------------------------------------)

4 min read

·

Just now

[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2Fc46e6ba8174c&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sawgatchettri001%2Fsetting-up-typescript-from-scratch-c46e6ba8174c&user=Sawgatchettri&userId=d21b491b98f&source=---header_actions--c46e6ba8174c---------------------clap_footer------------------)

--

[](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Fc46e6ba8174c&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sawgatchettri001%2Fsetting-up-typescript-from-scratch-c46e6ba8174c&source=---header_actions--c46e6ba8174c---------------------bookmark_footer------------------)

[Listen](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2Fplans%3Fdimension%3Dpost_audio_button%26postId%3Dc46e6ba8174c&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40sawgatchettri001%2Fsetting-up-typescript-from-scratch-c46e6ba8174c&source=---header_actions--c46e6ba8174c---------------------post_audio_button------------------)

Share

I was building an auth system in TypeScript when the setup alone made me scratch my head long enough to take medicines. Let me save you that pain.

Let me walk you through the setting up TS so that you don’t have to spend you most of the time juggling here and there until procrastination hits.. as we say tomorrow is there…we will do it tomorrow.

After creating a project folder we will use terminal to setup TS for our project.

1. Nothing special here — just initializes your project, command to initialize ->**npm init -y**

Press enter or click to view image in full size

![Image 3: we will first initialize our project using : npm init -y](https://medium.com/@sawgatchettri001/setting-up-typescript-from-scratch-c46e6ba8174c?source=rss------programming-5)

2. Then real TS setup starts from here, we will install typescript for this project using following command:**npm install typescript**

here we are using this command to setup TypeScript locally per
Read full article → ← Back to Reads