Skip to content

Unable to get Intellisense via JSDoc if referencing a type from other file #32831

Closed
@Gelio

Description

@Gelio
  • VSCode Version: 1.15.1
  • OS Version: Windows 10 Pro 15063

foo.js:

export default class Foo {
  fooMethod() {
    console.log('Foo method called');
  }
}

bar.js:

/**
 * @param {Foo} foo 
 */
export default function bar(foo) {
  foo.
  // no Intellisense provided after the dot above
}

If I import Foo at the beginning of bar.js, like so:

import Foo from './foo';

then Intellisense works correctly. This is not ideal, though, as this import is not required for bar.js and eslint will often complain that Foo is not used.

Is there a way to get proper Intellisense without importing that module explicitly?

Metadata

Metadata

Assignees

Labels

javascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions