TypeScript without TypeScript

As a superset of JavaScript, TypeScript provides a lot of useful features. It’s no mystery why it is one of the “most loved” languages in software engineering. When everything is running smoothly, TypeScript can been a huge boon to productivity.

However, therein lies one of TypeScript’s weaknesses: the setup. TS adds a level of overhead that is, in my opinion, prohibitively complex for most of my projects. So while I would love the benefits of working in TypeScript, I don’t want to go through the trouble of setting it up.

In searching for a solution to my problem, I came across TypeScript without TypeScript – JSDoc superpowers by @ddprrt on fettblog.eu. In it, the author highlights how JSDoc can provide some of the features of TypeScript without the setup.

I found the “Defining Objects” section to be particularly helpful. The ability to create “interfaces” for functions and objects in JavaScript is really powerful. If you combine that with // @ts-check and a TS-centric IDE like VS Code, you’ll find yourself in a great position when developing.

Give the article a read and let me know what you think.

Happy typing!

Matthew 22:32 (SDG)


My name is Sean McPherson (SeanMcP), and I am a software engineer based in Pittsburgh, PA. Here I write articles about programming for developers of all levels.