Skip to content

[Salsa] Provide a JSDoc equivalent of import { ..} from "mod" #14377

Closed
@mhegazy

Description

@mhegazy

Given an implementation of a class:

// file.js

export default class File {
   ...
}

How can you use the type without importing the module:

// another
export default Util {
   /** @param {File} file  */
   getFile(file) {
   }
}

One option is to use @module
e.g.:

   /** @param {module:./file:File} file  */
   getFile(file) {
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions