Introducing TypeScript…

What is it?

Dynamic typing vs. Static type checking…

Benefits?

  • TypeScript can easily adapt to existing JavaScript files. Meaning you do not have to start using TypeScript in every file or right off the bat in a program but can gradually add it in here and there.
  • TypeScript offers all of JavaScript’s features as well as an additional layer of TypeScript type system.
  • Like we mentioned above, your existing JS code is TS so go on with loving your JavaScript language!
  • TypeScript helps predict behavior of values so we can avoid a lot of hidden errors!

How to use?

here is a simple object …
here is how we can use TypeScript, we create an interface declaration to explicitly describe this object’s shapes
now we reference our interface by using the syntax like : TypeName after a variable declaration
JS && TS support classes and object-oriented programming (my fellow react lovers can implement TS in their programs as well!)

Conclusion…

--

--

--

software engineer. red wine addict. obsessed with vintage cars and jewelry.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Arrow functions in JavaScript (=>)

test this medium post

Stack Navigation in React Native Expo

What are Node, NPM, NVM, Yarn, Babel, Webpack and Loader

Eliding Properties in TypeScript

Android holding an oversized wrench

Bits and Ends — Javascipt Project (Flatiron)

nivobar: Responsive Bar Reactjs and typescript

A Vue Modal Manager (via Vuex)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
syd

syd

software engineer. red wine addict. obsessed with vintage cars and jewelry.

More from Medium

Schema Migration for Firestore

Setting Up Firebase Local Emulators using NodeJS

Create a food ordering application with Monaca, React and Framework 7 with Firebase database

Create a food ordering application with Monaca, React and Framework 7 with Firebase database