Closed
Description
From @alexandrudima on January 27, 2016 12:40
Testing #2218
I would expect Person
and Person2
to behave the same given the JSDoc "types" age
to be a number
.
/**
* @param {number} age
*/
function Person(age) {
this.age = age; // <- it knows age is a number
}
function Person2() {
this.age = 13;
}
var p1 = new Person();
var p2 = new Person2();
var a = p1.age; // <- it doesn't know this is a number
var b = p2.age; // <- it knows this is a number
Copied from original issue: microsoft/vscode#2437