TypeScript has become the default language of choice as web development has embraced static typing during the past decade. However, there are times when you don’t want to use TypeScript, whether due to tooling constraints, longer setup and compile time, or a team member who does not like static typing. JSDoc is a good alternative as it can be understood by the TypeScript compiler and lets you take advantage of some of the benefits of static typing without needing a single .ts file. This post serves as a crash course in using JSDoc as an alternative syntax for TypeScript and covers the important TypeScript-related features.
Tuesday, March 5, 2024