Reacting to TypeScript

Erick Delfin

Frontend Dev @ Nearsoft

TypeScript?

A superset of JavaScript that adds functionality like static type-checking, interfaces and classes.

Compiles to JavaScript.

What problem does TypeScript solve?

With run-time type validation

Good ole JavaScript

Created using carbon.now.sh

Compile-time dopeness

Use case

Why?

  • Structure
  • Scale
  • Real intellisense
  • Declaration files
  • Less boilerplate tests
  • Catch problems earlier

 

  • All JavaScript is valid TypeScript!

TypeScript is a great tool, but not the absolute truth.

It's still just JavaScript

React + TypeScript

  • JSX
  • Events
  • Immutability without ImmutableJS
  • Autocompletion
  • PropTypes?
  • CRA support

Expressive components

More Work Up Front Means Less Work Later

"Tools amplify your talent. The better your tools, and the better you know how to use them, the more productive you can be."

- Andrew Hunt, The Pragmatic Programmer

Made with Slides.com