How to Compile a TypeScript Node.js Project
TypeScript is a development tool geared towards making building JavaScript applications more robust. In an application's deployed state (browser or server), TypeScript must be compiled to valid JavaScript. In this lesson, we'll see how the TypeScript compiler provides us with a command to compile and produce JavaScript code from TypeScript.
Compiling our TypeScript project
π This lesson's quiz can be found - here.
ποΈ Solutions for This lesson's quiz can be found - here.
Though our application is now suited for TypeScript development; to have our code be ready for production, it first must be built (i.e. compiled) as a JavaScript project. This is perfectly ok because TypeScript was only created to help developers during the development phase. Once the app is in production, known bugs should have all been fixed!
To achieve the compiling of our entire TypeScript project, we're going to create a new script in the package.json file which we'll call the build/ script.
This lesson preview is part of the The newline Guide to Building Your First GraphQL Server with Node and TypeScript course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.
Get unlimited access to The newline Guide to Building Your First GraphQL Server with Node and TypeScript, plus 90+ \newline books, guides and courses with the \newline Pro subscription.
