Simple trick to optimize your Typescript code

Audience

Anyone who works on a project that uses outdated Typescript.

  1. You could upgrade, but I am sure you are stuck at an old version for a good reason
  2. You could also implement the feature yourself!
Typescript v3.2.4
Typescript v3.2.4

Conclusion

The type keyword gives developers ability to take advantage of all typing information available to them, without worrying about exposing the actual code to the end user.

--

--

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
Marcellin Nshimiyimana

Marcellin Nshimiyimana

Always debugging, because problem knowledge equals half the solution!