jsdoc-tsimport-plugin
jsdoc-tsimport-plugin copied to clipboard
Parser fails for Object["property"] syntax for successfully imported types
This plugin works great to resolve import syntax like so:
/** @typedef {import("../bakery").Cake} Cake */
But VSCode requires that properties on these types used in other JSDoc annotations use this Object["property"] syntax, not dot syntax (reserved for namespaces). So this fails to parse and JSDoc will throw:
/**
* @param {string} name
* @param {Cake["icing"]} icing
* @returns {Cake} Returns new {@link Cake} on success.
*/
function makeACake(name, icing) {
... cake making stuff
}