8000 vscode jsdoc import module type def not imported · Issue #22884 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
vscode jsdoc import module type def not imported #22884
@mjbvz

Description

@mjbvz

From @shivshankar3578 on March 24, 2018 11:9

@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

Copied from original issue: microsoft/vscode#46463

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptWorking as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0