Some developers rely heavily on intelligent code completion for their development workflow. If you’re developing outside of a powerful IDE like Visual Studio, you may only be aware of “smart” code completion. Because JavaScript is loosely typed and many JavaScript developers don’t mind monkey patching where needed, you may not know what Micorosoft’s IntelliSense brings to the table.
A recent update to Visual Studio Code opens up a world of possibilities for JavaScript developers.
While Code previously applied the TypeScript Language Service to any JavaScript file to enhance code completion possibilities, it now offers much more by leveraging “Automatic Type Acquisition”. Automatic Type Acquisition, or ATA, inspects a project’s package.json
file and fetches type definitions from DefinitelyTyped, a GitHub repository of community contributed TypeScript definitions for common libraries and packages.
In this video I demonstrate how ATA works and also show how to apply JSDOC-style comments to enable even more IntelliSense within Visual Studio Code.
If you’re a JavaScript developer looking for a richer development experience, download Visual Studio Code today.