Wed. Dec 4th, 2019

Host your Website

Read and learn

FatCow Web Hosting $1.00/mo* Trust your web hosting to the #1 web host provider, GoDaddy!

Pro tip: type-check your JavaScript the easy way!

1 min read

Sure, TypeScript isn’t for everyone. But sometimes you want types and type-checking… well, turns out you can use the TypeScript compiler to check the types on your JavaScript – let me show you how!

More info:

4 thoughts on “Pro tip: type-check your JavaScript the easy way!

  1. JSDoc is actually still the only way to add a description to your functions and variables, even TypeScript ones.
    You can actually use it in place of TypeScript types in .ts files. You can't do all the type manipulations that TypeScript allows of course, but in many cases it's enough.
    I think JSDoc is the unsung hero of all this. Not many really use it correctly, and the official docs are IMO quite lackluster…

Comments are closed.

Copyright © All rights reserved. | Newsphere by AF themes.