Skip to content

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

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
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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