SFNode '20 - How to move your project to TypeScript

SFNode '20 - How to move your project to TypeScript

We've all been there. You are working on a feature or bug in JavaScript, think you finally got it, run the code and there it is, it basically screams at you: "undefined is not a function". I love JavaScript but as my codebases for projects grow, certain pains appear again and again.

In recent years TypeScript has gained popularity as a tool to avoid common pains when developing a growing web application.

However, what if you already have a large JavaScript application? Adding types and moving to a new language can be cumbersum and frustrating.

In this talk we'll go through ways how you can leverage the power of TypeScript without having to refactor your entire codebase and instead use features of TypeScript at your own pace. Slowly adding more features when YOU want to.

0722ad084c65f6177d80cf793cfbd013?s=128

Dominik Kundel

January 09, 2020
Tweet

Transcript

  1. How to move your project to TypeScript SFNode January 2020

    Dominik Kundel d-k.im/ts-sfnode Dominik Kundel | @dkundel | @sfnode|
  2. Dominik Kundel | @dkundel | @sfnode| console.log(` Hi! I’m Dominik

    Kundel `); dkundel.com @dkundel dkundel@twilio.com github/dkundel Developer Evangelist !&& JavaScript Hacker
  3. What is TypeScript? ▶ Superset of JavaScript ▶ Introduces static

    types to the language ▶ Provides a compiler & language service Dominik Kundel | @dkundel | @sfnode|
  4. Why TypeScript ▶ Safer code ▶ Better user/developer experience ▶

    Faster/easier refactoring Dominik Kundel | @dkundel | @sfnode|
  5. Example Webpack ▶ Webpack is written in JS and uses

    TypeScript ▶ github.com/webpack/webpack/ pull/6862 Dominik Kundel | @dkundel | @sfnode|
  6. Dominik Kundel | @dkundel | @sfnode| How to leverage TypeScript

    the way YOU want to!
  7. Dominik Kundel | @dkundel | @sfnode| How to leverage TypeScript

    the way YOU want to! At your own pace!
  8. Let's do it live! github.com/dkundel/ts-move-demo/pull/1 Dominik Kundel | @dkundel |

    @sfnode|
  9. Step by Step Blog Post twilio.com/blog/move-to-typescript Dominik Kundel | @dkundel

    | @sfnode|
  10. console.log(` Thank You! `); dkundel.com @dkundel dkundel@twilio.com github/dkundel d-k.im/ts-sfnode Dominik

    Kundel | @dkundel | @sfnode|