JsDoc: Defining param type to be a type from an external module JsDoc: Defining param type to be a type from an external module mongoose mongoose

JsDoc: Defining param type to be a type from an external module


I may be on thin ice here, since I'm just a hobbyist, and I'm only using JSDoc to get IntelliSense in Visual Studio Code.This JSDoc solved my problem:

/** @param {import("express").Response} expressResponse */function send(expressResponse) {    expressResponse.send('OK');}

I was not able to find the syntax in http://usejsdoc.org/tags-param.html so this could be specific to typescript.Here's where I found the idea: https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html

Hope this gives some help although it may not be completely correct.