Phil Nash
4 Steps from JavaScript to TypeScript
#1about 4 minutes
Evaluating the pros and cons of TypeScript adoption
Consider the benefits of type safety and improved tooling against the costs of a learning curve and build overhead before migrating a project.
#2about 3 minutes
Step 1: Enable TypeScript type checking for JavaScript files
Use editor settings like `checkJs` or a `// @ts-check` comment to get immediate type feedback on your JavaScript code without any build changes.
#3about 5 minutes
Step 2: Introduce the TypeScript compiler with a minimal setup
Add TypeScript as a dependency and configure `tsconfig.json` with non-strict settings like `allowJs` to compile existing JavaScript without errors.
#4about 3 minutes
Step 3: Enable build-time type checking for JavaScript files
Activate `checkJs` in your `tsconfig.json` to enforce type safety during the build and install necessary `@types` packages for dependencies.
#5about 4 minutes
Leverage JS Doc for type safety in JavaScript
Add types to your JavaScript project using JS Doc comments, allowing TypeScript to provide strong typing without converting files to `.ts`.
#6about 5 minutes
Step 4: Incrementally convert JavaScript files to TypeScript
Gradually rename `.js` files to `.ts` one at a time, updating syntax from CommonJS to ES Modules and adding explicit types as you go.
#7about 2 minutes
Recap of the four-step JavaScript to TypeScript migration
Review the complete migration path, from enabling editor checks and introducing the compiler to incrementally converting files and adding types.
#8about 2 minutes
How to convince your team to adopt TypeScript
Demonstrate the value of TypeScript by enabling `checkJs` on an existing project to reveal hidden type-related issues as a practical proof point.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
32:12 MIN
Strategies for migrating large codebases to TypeScript
WeAreDevelopers LIVE - Whats Nuxt and Next for app development, 20 years AJAX and more
22:24 MIN
Why TypeScript is essential for building large applications
Building a large, complex product from the ground up with typescript & Atomic Design:lessons learned
15:04 MIN
Using JSDoc to get TypeScript benefits without TypeScript
Do TypeScript without TypeScript
29:20 MIN
Why readable code and developer happiness trumped TypeScript
Coffee with Developers: David Heinemeier Hansson
00:41 MIN
The benefits of using TypeScript with Svelte
Svelte ♥ TypeScript and so will you
00:51 MIN
Understanding TypeScript's origins and role in scalability
All you need is types
03:20 MIN
Why JavaScript and TypeScript dominate modern development
Modern Headless Commerce with Vendure
09:46 MIN
Exploring the key benefits of adopting TypeScript
Do TypeScript without TypeScript
Featured Partners
Related Videos
Do TypeScript without TypeScript
Simone Sanfratello
Building software that scales with Typescript
Tal Joffe
Don't compromise on speedy delivery nor type-safety by choosing TypeScript
Jens Claes
All you need is types
Tal Joffe
Lies we Tell Ourselves As Developers
Stefan Baumgartner
Where we're going we don't need JavaScript - Programming with Type Annotations
Peter Kröner
Advanced Typing in TypeScript
Lars Hupel
Svelte ♥ TypeScript and so will you
Ivan Hofer
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.
![Senior Software Engineer [TypeScript] (Prisma Postgres)](https://wearedevelopers.imgix.net/company/283ba9dbbab3649de02b9b49e6284fd9/cover/oKWz2s90Z218LE8pFthP.png?w=400&ar=3.55&fit=crop&crop=entropy&auto=compress,format)
Senior Software Engineer [TypeScript] (Prisma Postgres)
Prisma
Remote
Senior
Node.js
TypeScript
PostgreSQL


Senior Full-Stack TypeScript Engineer (React, Node, TypeScript, AWS)
Provectus
Remote
API
GIT
JSON
REST
+11

Typescript Full Stack Engineer
Full Stack Typescript Engineer83zero Limited
Glasgow, United Kingdom
£45-55K
GIT
Java
REST
Azure
+16

TypeScript AWS Developer
TechShack
Charing Cross, United Kingdom
£156-182K
Senior
Terraform
TypeScript
Microservices
Amazon Web Services (AWS)

TypeScript Engineer (OOP/React/Three.js)
Materialise
Barcelona, Spain
Intermediate
Java
React
Three.js
TypeScript
Unit Testing
+1

Senior Full-Stack TypeScript Engineer (React, Node, TypeScript, AWS)
Provectus
Canton de Saint-Mihiel, France
Remote
Senior
API
GIT
JSON
REST
+11

Frontend-Entwicklung mit Schwerpunkt TypeScript / JavaScript
Projektron GmbH
Berlin, Germany
Remote
Intermediate
CSS
Java
React
Gradle
+5

JavaScript I TypeScript Backend Webentwickler
Soulhouse GmbH
Hamburg, Germany
€60-80K
Junior
Ionic
React
DevOps
MongoDB
+5