profile
viewpoint

Ask questionsRemove util.inherits usage internally?

Currently, util.inherits does this:

https://github.com/nodejs/node/blob/e1aa7301b4118a92a8f056d1bc02e6069886a913/lib/util.js#L300-L318

Most of the code seems unnecessary for our internal use. Essentially we can just replace all the internal util.inherits usage with Object.setPrototypeOf(ctor.prototype, superCtor.prototype)

Unless someone is relying on that ctor._super property existing on our internal types..

Any thoughts?

nodejs/node

Answer questions peanutenthusiast

If the issue is still open, I'd be interested in looking into this?

useful!
source:https://uonfu.com/
Github User Rank List