Why use TypeScript, good and bad reasons

Charly POLY

Paris TypeScript #13

Why use TypeScript, good and bad reasons

Should I use TypeScript? Do I need it?

⚠️ Theses slides only reflects my opinion, lessons I learned and quoted opinions of others developers.

Bad reasons
Good reasons
Conclusion

Why use TypeScript, good and bad reasons

Why use TypeScript, good and bad reasons

With TypeScript,
no need of writing tests

Types are written by the developers and not checked at runtime,
so the “strength” of your program depends on your usage of TypeScript.

Why use TypeScript, good and bad reasons

Is a 15% reduction in bugs making it all the way through your development pipeline worth it to you?

With TypeScript,
no need of writing tests

Why use TypeScript, good and bad reasons

With TypeScript,
I can trust my code at runtime 

TypeScript is a static type-checking tool, it does not guarantee that your code will run as expected at runtime.

Why use TypeScript, good and bad reasons

TypeScript looks more like C#,
I don’t need to understand JavaScript

TypeScript shouldn't be used to put some non-JavaScript developers on the front-end as fast as possible.

Bad reasons
Good reasons
Conclusion

Why use TypeScript, good and bad reasons

Why use TypeScript, good and bad reasons

TypeScript will help your developers work together on a growing codebase

TypeScript allow developers to focus on exposed API
rather than having to know all the code by heart.

Why use TypeScript, good and bad reasons

TypeScript will help your developers work together on a growing codebase

Why use TypeScript, good and bad reasons

TypeScript tools will save your developers time

This allow me to focus on real problems and let TypeScript cover my back on the things I already know but that I forget sometimes (typos, standard APIs, etc …)

Why use TypeScript, good and bad reasons

The Microsoft community-effort success story

  • JS typing tool battle winner
  • OSS libraries typing coverage
  • Libraries integrations : React, ApolloData

Why use TypeScript, good and bad reasons

TypeScript gives you a taste of future JavaScript, with typings.

Even if “TypeScript” contains “type”,
the language do not force us to use types.

Bad reasons
Good reasons
Conclusion

Why use TypeScript, good and bad reasons

Why use TypeScript, good and bad reasons

Bad

  • Test replacement,
    TypeScript ain’t a test framework
  • Runtime safety,
    TypeScript ain’t a runtime type checker
  • I can write object-oriented C# a-like code,
    TypeScript is typed JavaScript

     

Good

  • Team and code scalability with “Interface oriented development”
    TypeScript will help you dealing with growing teams and large codebase
  • Tooling and Community
    Microsoft made an awesome community effort work.
  • ES-next compliance
    TypeScript give you a taste of future JavaScript, with typing.

TypeScript Essentials

Why use TypeScript, good and bad reasons

Sources

Why use TypeScript, good and bad reasons

By Charly Poly

Why use TypeScript, good and bad reasons

  • 1,987