Skip to content

Parser fails for Object["property"] syntax for successfully imported types #14

@jcurtis-cc

Description

@jcurtis-cc

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions