Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TypeScript - JavaScript you are gonna to love

TypeScript - JavaScript you are gonna to love

TypeScript, as the superset of JS uses compile-time type checkings with latest specification standard and proposals. The community chose it for thousands of projects, and it is not limited to the Angular ecosystem. It brings such powerful features like interfaces, generics, abstract classes into JS. With all-powerful tooling, it will make your JavaScript, React, Vue cleaner and less error-prone. It could involve back-end developers with Java or C# background into the client-side code. I want to show that with TypeScript you will be more productive no matter what front end technology you use.

Vitalii Bobrov

May 09, 2018

More Decks by Vitalii Bobrov

Other Decks in Programming


  1. TypeScript: JavaScript you are gonna to love ❤

  2. Who am I? ๏5 years of front-end experience ๏big enterprise

    projects ๏mentor ๏OSS contributor @bobrov1989 https://vitaliy-bobrov.github.io/
  3. Agenda ๏WTF TypeScript!? ๏Type system ๏How to Start? ๏Tooling ๏Integrations

  4. WTF TypeScript!?

  5. Trivial Problem

  6. JS Expression Trivia

  7. JS Expression Trivia

  8. JS Expression Trivia

  9. JS Expression Trivia

  10. There are NO DEFECTS if there is NO DOCs

  11. Trivial Solution

  12. jsDoc ๏Too verbose ๏Remember to update ๏No warnings of wrong

  13. TypeScript JavaScript ESNext Types

  14. Any JavaScript is VALID TypeScript

  15. ESNext

  16. WHY? ๏Complex projects ๏Static analysis ๏Reduce errors rate ๏Easy to

    refactor and maintain
  17. Type System

  18. let variable: TYPE;

  19. Cheat

  20. Base Types

  21. Functions

  22. Array & Tuple

  23. enum

  24. Interface

  25. Abstract Class

  26. Union types

  27. Partials

  28. DOM API

  29. http://www.typescriptlang.org/docs/

  30. How to Start?

  31. REPL http://www.typescriptlang.org/play/index.html

  32. IDE & Text Editors

  33. Just change extension from .js to .ts %

  34. Tooling

  35. JavaScript checks

  36. TypeScript compiler

  37. tsconfig.json

  38. Webpack

  39. Parcel https://parceljs.org/

  40. TypeWiz https://github.com/urish/typewiz

  41. 3rd party libraries http://definitelytyped.org/

  42. Frameworks

  43. None
  44. None
  45. None
  46. https://medium.com/@martin_hotell

  47. Integrations

  48. Strictly typed REST API calls

  49. Just use TypeScript to write NodeJS project %

  50. Java / C# Swagger

  51. JSON Schema

  52. Thank YOU! @bobrov1989 https://vitaliy-bobrov.github.io/