Title: repl: autocompletion after `new X.` targets `new X()`, not `X` · Issue #60306 · nodejs/node · GitHub
Open Graph Title: repl: autocompletion after `new X.` targets `new X()`, not `X` · Issue #60306 · nodejs/node
X Title: repl: autocompletion after `new X.` targets `new X()`, not `X` · Issue #60306 · nodejs/node
Description: Version 25.0.0 Platform Subsystem repl What steps will reproduce the bug? > class X { x = 1 } undefined > X.Y = class Y { y = 2 } [class Y] > new X. <[Tab]> <[Tab]> new X.__proto__ new X.hasOwnProperty new X.isPrototypeOf new X.propertyI...
Open Graph Description: Version 25.0.0 Platform Subsystem repl What steps will reproduce the bug? > class X { x = 1 } undefined > X.Y = class Y { y = 2 } [class Y] > new X. <[Tab]> <[Tab]> new X.__proto__ new X.hasOwnProp...
X Description: Version 25.0.0 Platform Subsystem repl What steps will reproduce the bug? > class X { x = 1 } undefined > X.Y = class Y { y = 2 } [class Y] > new X. <[Tab]> <[Tab]> new X.__pro...
Opengraph URL: https://github.com/nodejs/node/issues/60306
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"repl: autocompletion after `new X.` targets `new X()`, not `X`","articleBody":"### Version\n\n25.0.0\n\n### Platform\n\n```text\n\n```\n\n### Subsystem\n\nrepl\n\n### What steps will reproduce the bug?\n\n```console\n\u003e class X { x = 1 }\nundefined\n\u003e X.Y = class Y { y = 2 }\n[class Y]\n\u003e new X. \u003c[Tab]\u003e \u003c[Tab]\u003e\nnew X.__proto__ new X.hasOwnProperty new X.isPrototypeOf new X.propertyIsEnumerable\nnew X.toLocaleString new X.toString new X.valueOf\n\nnew X.constructor\n\nnew X.x\n```\n\n### How often does it reproduce? Is there a required condition?\n\n\u0026nbsp;\n\n### What is the expected behavior? Why is that the expected behavior?\n\nProperty access has higher precedence than `new`, so this should autocomplete from the properties of `X`.\n\n### What do you see instead?\n\nAutocompletion from the properties of `new X()`. If X is not a constructor, offers nothing.\n\n### Additional information\n\nThe fact that the completer also triggers side-effects from calling the constructor in question is less than ideal, but this isn't the first issue on that front.","author":{"url":"https://github.com/Renegade334","@type":"Person","name":"Renegade334"},"datePublished":"2025-10-17T23:53:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/60306/node/issues/60306"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:34405c6b-59c5-dc8f-32b1-5a487d5bee8f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9CC:31E832:72AB9:96B7E:6A4D8F22 |
| html-safe-nonce | d955d12f817691d9f7f91b2411f881f675899f3cd679b7f4fe53b5320c1c1db7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUNDOjMxRTgzMjo3MkFCOTo5NkI3RTo2QTREOEYyMiIsInZpc2l0b3JfaWQiOiIxOTg5MjcxNzczNDUxNzUxMjAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5ddcb5053017f7d46a370c970f61e98cf4087efbee291f12a020dec3cafcfafe |
| hovercard-subject-tag | issue:3527835087 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/60306/issue_layout |
| twitter:image | https://opengraph.githubassets.com/85df9443688e1369be0248e116aa6932c99281a7d895b0c0b30a888bf5715e15/nodejs/node/issues/60306 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/85df9443688e1369be0248e116aa6932c99281a7d895b0c0b30a888bf5715e15/nodejs/node/issues/60306 |
| og:image:alt | Version 25.0.0 Platform Subsystem repl What steps will reproduce the bug? > class X { x = 1 } undefined > X.Y = class Y { y = 2 } [class Y] > new X. <[Tab]> <[Tab]> new X.__proto__ new X.hasOwnProp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Renegade334 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 74e2a9c78f1e38588de4f25885878349d721eedf |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width