Title: Lexical this not captured for super element accessed calls · Issue #21081 · microsoft/TypeScript · GitHub
Open Graph Title: Lexical this not captured for super element accessed calls · Issue #21081 · microsoft/TypeScript
X Title: Lexical this not captured for super element accessed calls · Issue #21081 · microsoft/TypeScript
Description: TypeScript Version: 2.7.0-dev.201xxxxx Code class A { x() {} } class B extends A { constructor() { super(); } foo() { return () => { super["x"](); } } } Expected behavior: var A = /** @class */ (function () { function A() { } A.prototype...
Open Graph Description: TypeScript Version: 2.7.0-dev.201xxxxx Code class A { x() {} } class B extends A { constructor() { super(); } foo() { return () => { super["x"](); } } } Expected behavior: var A = /** @class */ (fu...
X Description: TypeScript Version: 2.7.0-dev.201xxxxx Code class A { x() {} } class B extends A { constructor() { super(); } foo() { return () => { super["x"](); } } } Expected behavior: var A = /** ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/21081
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lexical this not captured for super element accessed calls","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 2.7.0-dev.201xxxxx\r\n\r\n**Code**\r\n\r\n```ts\r\nclass A { x() {} }\r\n\r\nclass B extends A {\r\n constructor() {\r\n super();\r\n }\r\n foo() {\r\n return () => {\r\n super[\"x\"]();\r\n }\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n```js\r\nvar A = /** @class */ (function () {\r\n function A() {\r\n }\r\n A.prototype.x = function () { };\r\n return A;\r\n}());\r\nvar B = /** @class */ (function (_super) {\r\n __extends(B, _super);\r\n function B() {\r\n return _super.call(this) || this;\r\n }\r\n B.prototype.foo = function () {\r\n var _this = this;\r\n return function () {\r\n _super.prototype[\"x\"].call(_this);\r\n };\r\n };\r\n return B;\r\n}(A));\r\n```\r\n\r\n**Actual behavior:**\r\n```js\r\nvar A = /** @class */ (function () {\r\n function A() {\r\n }\r\n A.prototype.x = function () { };\r\n return A;\r\n}());\r\nvar B = /** @class */ (function (_super) {\r\n __extends(B, _super);\r\n function B() {\r\n return _super.call(this) || this;\r\n }\r\n B.prototype.foo = function () {\r\n return function () {\r\n _super.prototype[\"x\"].call(this);\r\n };\r\n };\r\n return B;\r\n}(A));\r\n```\r\n\r\n**Related:**\r\nFound while working on #20125; will likely be included in the fix.","author":{"url":"https://github.com/weswigham","@type":"Person","name":"weswigham"},"datePublished":"2018-01-09T01:55:39Z","url":"https://github.com/microsoft/TypeScript/issues/21081"}
| 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:0bcf7540-9c9d-a11f-29c2-3c66955b482a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8474:A439B:1002038:14C9FBC:6B03F504 |
| html-safe-nonce | fe179b4855ccf6fcf5af9a8e490c8977f25da3aa7f580b5b0df3da492f21b0cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDc0OkE0MzlCOjEwMDIwMzg6MTRDOUZCQzo2QjAzRjUwNCIsInZpc2l0b3JfaWQiOiIzMzEwNzgyNzkxODIxODE3MDkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9f842bd01dd3172eb8b1cccc6834d7b15b869049d7cef19e7946e9f15de4dd27 |
| hovercard-subject-tag | issue:286946173 |
| 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/21081/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a957ae55c64d1ea729ec12b5ce40148c0870f85b3e6f77d805493ef95e1785e2/microsoft/TypeScript/issues/21081 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a957ae55c64d1ea729ec12b5ce40148c0870f85b3e6f77d805493ef95e1785e2/microsoft/TypeScript/issues/21081 |
| og:image:alt | TypeScript Version: 2.7.0-dev.201xxxxx Code class A { x() {} } class B extends A { constructor() { super(); } foo() { return () => { super["x"](); } } } Expected behavior: var A = /** @class */ (fu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weswigham |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width