Utah Code Camp
Saturday April 16th, 2016
University of Utah
Our Sponsors

Using TypeScript

in your JavaScript projects

By Joe Skeen / @joeskeenjr

About Me

Passionate developer and evangelist

Have worked with JavaScript,
TypeScript, C#, Java, and a
handful of other languages

Places I've worked for

Community

DefinitelyTyped top 100 contributors

https://hackhands.com/joeskeen/

So... What is TypeScript?

Open-source language

Superset of JavaScript

Adds ES6+ features

Adds optional static typing

A Productivity Tool

To help you write better JavaScript

We don't need no stinking types in JavaScript!

There are already types in JavaScript!

  • boolean
  • number
  • string
  • object
  • undefined

Types are not exposed through the language.

TypeScript provides a gradual typing system for typing where you need it.

Why?

Sometimes JavaScript projects start small...

...but they grow up.

Why?

Low barrier to entry

Your existing JavaScript code is already valid TypeScript

https://github.com/borisyankov/DefinitelyTyped

http://definitelytyped.org/tsd/

https://channel9.msdn.com/events/Build/2016/B881

Enough talk, let's see code!

How much does the editor know about your JS code?

VSCode

Some Sample JavaScript Code

The Same JavaScript Code as TypeScript

Questions

The End

https://github.com/joeskeen

https://hackhands.com/joeskeen

Our Sponsors