Getting JSDoc to work with TypeScript typedef imports.
Nicholas Bilyk

Nicholas Bilyk @nbilyk

Joined:
Jan 15, 2021

Getting JSDoc to work with TypeScript typedef imports.

Publish Date: Jan 27 '21
2 0

Alt Text

I've been on a journey to write less esoteric, more accessible code. Before I start writing up my experiences, I'd like to announce a tiny, tiny utility that solves a simple problem I hit when doing plain javascript development.

To document and get type hinting for plain JavaScript, the easiest way to do so is to use a tool called jsdoc. The problem is when you wish to import type definitions /** @typedef ... */ into another file for re-use. VSCode doesn't understand the jsdoc module import format, and jsdoc doesn't understand the typescript style import. My utility works to translate.

For more information, head over to:

https://github.com/polyforest/jsdoc-tsimport-plugin

Comments 0 total

    Add comment