Adding TypeScript to NPM Packages
Adding TypeScript to 3rd party modules in 2019 is a breeze thanks to Babel and TypeScript.
![Adding TypeScript to NPM Packages Adding TypeScript to NPM Packages](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F613d846a-2a01-4070-a288-55a7e543e1be_2020x1310.png)
I've been using TypeScript in my projects for the past month or so. After a two year hiatus, it finally seems right for me. Using it in an app is documented everywhere, but adding it into a package for NPM seems more scattered. Here's a real easy way to set this up with Babel 7.
Install TypeScript
npm install typescript --save-dev
Next, let's install the n…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.