This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 247376 - Try to show variable type where possible
Summary: Try to show variable type where possible
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 19:17 UTC by Vladimir Riha
Modified: 2015-02-28 11:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-09-22 19:17:25 UTC
Please consider following:

responseError.js
======================================
function ResponseError(httpCode, msg) {
    this.httpCode = httpCode;
    this.msg = msg;
}
ResponseError.prototype.test = function(){};
ResponseError.prototype = Object.create(Error.prototype);
ResponseError.prototype.constructor = ResponseError;

module.exports = ResponseError;


myfile.js
======================================
var re = require("responseError");


var myError = new re();


=> both navigator and code completion show type of myError to be "re", would be nice if correct ResponseError would be displayed instead.


Thank you


Product Version: NetBeans IDE Dev (Build 201409220001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.13.0-35-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2014-09-22 19:17:57 UTC
I imagine there could be various "clear" cases
Comment 2 elennaro 2015-02-28 11:23:57 UTC
This is a totally needed feature!
If it could also act of cc suggestions arrangement it will be twice as great!