Port #9621 to release-2.0
This commit is contained in:
parent
fa0fab1523
commit
606ac0e533
2 changed files with 32 additions and 5 deletions
|
@ -3160,6 +3160,9 @@ namespace ts {
|
||||||
if (declaration.kind === SyntaxKind.ExportAssignment) {
|
if (declaration.kind === SyntaxKind.ExportAssignment) {
|
||||||
return links.type = checkExpression((<ExportAssignment>declaration).expression);
|
return links.type = checkExpression((<ExportAssignment>declaration).expression);
|
||||||
}
|
}
|
||||||
|
if (declaration.flags & NodeFlags.JavaScriptFile && declaration.kind === SyntaxKind.JSDocPropertyTag && (<JSDocPropertyTag>declaration).typeExpression) {
|
||||||
|
return links.type = getTypeFromTypeNode((<JSDocPropertyTag>declaration).typeExpression.type);
|
||||||
|
}
|
||||||
// Handle variable, parameter or property
|
// Handle variable, parameter or property
|
||||||
if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) {
|
if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) {
|
||||||
return unknownType;
|
return unknownType;
|
||||||
|
|
|
@ -32,16 +32,24 @@
|
||||||
//// var numberLike; numberLike./*numberLike*/
|
//// var numberLike; numberLike./*numberLike*/
|
||||||
////
|
////
|
||||||
//// /** @type {Person} */
|
//// /** @type {Person} */
|
||||||
//// var p;p./*person*/
|
//// var p;p./*person*/;
|
||||||
|
//// p.personName./*personName*/;
|
||||||
|
//// p.personAge./*personAge*/;
|
||||||
////
|
////
|
||||||
//// /** @type {Animal} */
|
//// /** @type {Animal} */
|
||||||
//// var a;a./*animal*/
|
//// var a;a./*animal*/;
|
||||||
|
//// a.animalName./*animalName*/;
|
||||||
|
//// a.animalAge./*animalAge*/;
|
||||||
////
|
////
|
||||||
//// /** @type {Cat} */
|
//// /** @type {Cat} */
|
||||||
//// var c;c./*cat*/
|
//// var c;c./*cat*/;
|
||||||
|
//// c.catName./*catName*/;
|
||||||
|
//// c.catAge./*catAge*/;
|
||||||
////
|
////
|
||||||
//// /** @type {Dog} */
|
//// /** @type {Dog} */
|
||||||
//// var d;d./*dog*/
|
//// var d;d./*dog*/;
|
||||||
|
//// d.dogName./*dogName*/;
|
||||||
|
//// d.dogAge./*dogAge*/;
|
||||||
|
|
||||||
goTo.marker('numberLike');
|
goTo.marker('numberLike');
|
||||||
verify.memberListContains('charAt');
|
verify.memberListContains('charAt');
|
||||||
|
@ -50,15 +58,31 @@ verify.memberListContains('toExponential');
|
||||||
goTo.marker('person');
|
goTo.marker('person');
|
||||||
verify.memberListContains('personName');
|
verify.memberListContains('personName');
|
||||||
verify.memberListContains('personAge');
|
verify.memberListContains('personAge');
|
||||||
|
goTo.marker('personName');
|
||||||
|
verify.memberListContains('charAt');
|
||||||
|
goTo.marker('personAge');
|
||||||
|
verify.memberListContains('toExponential');
|
||||||
|
|
||||||
goTo.marker('animal');
|
goTo.marker('animal');
|
||||||
verify.memberListContains('animalName');
|
verify.memberListContains('animalName');
|
||||||
verify.memberListContains('animalAge');
|
verify.memberListContains('animalAge');
|
||||||
|
goTo.marker('animalName');
|
||||||
|
verify.memberListContains('charAt');
|
||||||
|
goTo.marker('animalAge');
|
||||||
|
verify.memberListContains('toExponential');
|
||||||
|
|
||||||
goTo.marker('dog');
|
goTo.marker('dog');
|
||||||
verify.memberListContains('dogName');
|
verify.memberListContains('dogName');
|
||||||
verify.memberListContains('dogAge');
|
verify.memberListContains('dogAge');
|
||||||
|
goTo.marker('dogName');
|
||||||
|
verify.memberListContains('charAt');
|
||||||
|
goTo.marker('dogAge');
|
||||||
|
verify.memberListContains('toExponential');
|
||||||
|
|
||||||
goTo.marker('cat');
|
goTo.marker('cat');
|
||||||
verify.memberListContains('catName');
|
verify.memberListContains('catName');
|
||||||
verify.memberListContains('catAge');
|
verify.memberListContains('catAge');
|
||||||
|
goTo.marker('catName');
|
||||||
|
verify.memberListContains('charAt');
|
||||||
|
goTo.marker('catAge');
|
||||||
|
verify.memberListContains('toExponential');
|
Loading…
Reference in a new issue