Skip to content

Support import syntax (and possibly deprecate module syntax)Β #1632

@brettz9

Description

@brettz9

Expected behavior

Allow this Typescript syntax:

/**
 * @param p { import("./a").Pet }
*/

I'd personally also hope to see module: deprecated (at least eventually):

/**
 * @param p { module:a.Pet }
*/

...because:

  1. According to this comment, it is the only deliberate deviation of TypeScript from jsdoc and the only expected one.
  2. It is useful in its own right for documentation to make clear from where a module is being obtained, whether the path is a relative one, or as is apparently also allowed, one based on the well-used Node resolution algorithm.

Current behavior

Currently, the module syntax is not compatible with those wishing to move to Typescript (or considering doing so), or those using Typescript who wish to confine themselves to the subset supported by jsdoc3 so as to be able to take advantage of jsdoc3/jsdoc.

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