Closed
Description
module.exports.y = "hi"
let u = module.exports.y/**/
Get quick info at position.
Expected behavior:
The type of module.exports.y
is reported as string.
Actual behavior:
The type of module.exports.y
is reported as any, and there aren't any completions, so it seems like it actually is any.
Edit:
- Repros on 2.9.2 and master.
- When imported, the type is correct
var { y } = require('./mod')
y/**/
The declared type is used if there is one, even if it contradicts the initialiser (eg /** @type {number} */ module.exports.y = 'hi'
).