Closed
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