Skip to main content Accessibility Feedback

You dont need TypeScript

I know a lot of folks who like TypeScript. I also know a lot of folks who spend more time fighting TypeScript errors (on perfectly valid code) than they spend actually writing the code itself.

While I don’t personally find type safety to be an issue that needs solving in the projects I work on, friends of mine who regularly work on large, cross-functional teams seem to find it useful.

But rather than introducing another dependency to your project, you can instead use JSDoc, the industry-standard for JavaScript documentation for over a decade.

As Alex Harri explains…

I was surprised when I learned that the TypeScript compiler actually understands JSDoc comments. This fact allows you to type your entire codebase without creating a single .ts file.

Think of this post as your crash course in using JSDoc as an alternative syntax for TypeScript. We’ll cover all the important TypeScript-related features JSDoc has to offer—and their limitations.

Sound interesting? Read the whole article here.