Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode jsdoc import module type def not imported #46463

Closed
shivshankar3578 opened this issue Mar 24, 2018 · 1 comment
Closed

vscode jsdoc import module type def not imported #46463

shivshankar3578 opened this issue Mar 24, 2018 · 1 comment
Assignees
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@shivshankar3578
Copy link

shivshankar3578 commented Mar 24, 2018

@VScode:1.21
@node: 8.10

mod.js

/**
 *  @module mod
 */

/**
 * @typedef {Object} foobar
 * @property {String} foo
 * @property {Boolean} [bar] - Optional value
 */

/**
 * 
 * 
 * @param {string} foo 
 * @param {string} bar 
 * @return {foobar} 
 */
function doSomething (foo, bar) {
  console.log(foo, bar);
  // do something
  return {
	foo : foo,
	bar : bar
  }
}

let n = doSomething('a', 'b');

module.exports  = doSomething;

jsdoc.js

const mod = require('./mod');
let n = new mod('a', 'b'); 
console.log(n)

pic-1 n:foobar

pic-1

then why n:any here

pic-2

while imported module have foobar return type

pic-3

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 26, 2018

This issue was moved to microsoft/TypeScript#22884

@mjbvz mjbvz closed this as completed Mar 26, 2018
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Mar 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants