Title: Error when accessing private property in object destructuring assignment with computed name · Issue #26572 · microsoft/TypeScript · GitHub
Open Graph Title: Error when accessing private property in object destructuring assignment with computed name · Issue #26572 · microsoft/TypeScript
X Title: Error when accessing private property in object destructuring assignment with computed name · Issue #26572 · microsoft/TypeScript
Description: TypeScript Version: 3.1.0-dev.20180818 Search Terms: Code class Foo { private prop = 1; } let prop: any; ({['prop']: prop} = new Foo()); Expected behavior: No error on destructuring with computed property name. Actual behavior: Error on ...
Open Graph Description: TypeScript Version: 3.1.0-dev.20180818 Search Terms: Code class Foo { private prop = 1; } let prop: any; ({['prop']: prop} = new Foo()); Expected behavior: No error on destructuring with computed p...
X Description: TypeScript Version: 3.1.0-dev.20180818 Search Terms: Code class Foo { private prop = 1; } let prop: any; ({['prop']: prop} = new Foo()); Expected behavior: No error on destructuring with co...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26572
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error when accessing private property in object destructuring assignment with computed name","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.1.0-dev.20180818\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n\r\n**Code**\r\n\r\n```ts\r\nclass Foo {\r\n private prop = 1;\r\n}\r\nlet prop: any;\r\n({['prop']: prop} = new Foo());\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo error on destructuring with computed property name.\r\n\r\n**Actual behavior:**\r\n\r\nError on all statically known property names.\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n@andy-ms this was introduced in #26381 while fixing #26355","author":{"url":"https://github.com/ajafff","@type":"Person","name":"ajafff"},"datePublished":"2018-08-21T08:01:19Z","url":"https://github.com/microsoft/TypeScript/issues/26572"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:ad35a54b-2d0b-eb1c-910b-c6d1ea07ba91 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CED0:2652DC:2FD2DFD:3CEC74E:6B01B5A7 |
| html-safe-nonce | 0f9897722ce347195cd72afcf6079f799b94a998ede868027c85d5285e8289ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUQwOjI2NTJEQzoyRkQyREZEOjNDRUM3NEU6NkIwMUI1QTciLCJ2aXNpdG9yX2lkIjoiODMxMDM1MTM5NDUzNzI4MTY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e9229a353b7f959587fe39b40da66dc86019dde2e2017dbdc07b5888b5c2d2f1 |
| hovercard-subject-tag | issue:352427449 |
| 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/microsoft/TypeScript/26572/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55f6e7e7aa7c9f0df15079ff001b555b619238edbdcc590c49b95620b19e5bf4/microsoft/TypeScript/issues/26572 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55f6e7e7aa7c9f0df15079ff001b555b619238edbdcc590c49b95620b19e5bf4/microsoft/TypeScript/issues/26572 |
| og:image:alt | TypeScript Version: 3.1.0-dev.20180818 Search Terms: Code class Foo { private prop = 1; } let prop: any; ({['prop']: prop} = new Foo()); Expected behavior: No error on destructuring with computed p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ajafff |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width