-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
TypeScript Version: 2.1.6
Code
foo.js:
export class Foo {
/**
* @param {string} name
* @param {number} id
*/
constructor(name, id) {
this.name = name;
this.id = id
}
}
index.js:
const {Foo} = require('./foo');
/**
* @param {Foo} param
*/
function func(param) {
}
Expected behavior:
The type of param
is Foo
Actual behavior:
The type of param
is any
.
If I change the import to import {Foo} from './foo'
, the type of param
is correct
MicahZoltu, viskin and darky
Metadata
Metadata
Assignees
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue