Skip to content

"constructor" property of function prototype objects does not show up in autocomplete suggestions #15199

Closed
@todor2810

Description

@todor2810

Example:

> function f() {}
> f.prototype.
f.prototype.__defineGetter__      f.prototype.__defineSetter__      f.prototype.__lookupGetter__
f.prototype.__lookupSetter__      f.prototype.__proto__             f.prototype.constructor
f.prototype.hasOwnProperty        f.prototype.isPrototypeOf         f.prototype.propertyIsEnumerable
f.prototype.toLocaleString        f.prototype.toString              f.prototype.valueOf

> Object.getOwnPropertyNames(f.prototype);
[ 'constructor' ]

In the example above it only shows the inherited "constructor" property from Object.prototype.

Non-enumerable properties of other objects show up, though.
Example:

> let o = {};
> Object.defineProperty(o, "firstName", {value: "ted"});
> o.
o.__defineGetter__      o.__defineSetter__      o.__lookupGetter__      o.__lookupSetter__
o.__proto__             o.constructor           o.hasOwnProperty        o.isPrototypeOf
o.propertyIsEnumerable  o.toLocaleString        o.toString              o.valueOf

o.firstName

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions