Title: ReferenceError: _this is not defined, if an arrow function is a static member of a class. · Issue #16924 · microsoft/TypeScript · GitHub
Open Graph Title: ReferenceError: _this is not defined, if an arrow function is a static member of a class. · Issue #16924 · microsoft/TypeScript
X Title: ReferenceError: _this is not defined, if an arrow function is a static member of a class. · Issue #16924 · microsoft/TypeScript
Description: TypeScript Version: 2.4.0 / 2.4.1 / 2.5.0-dev.20170629 Code /* TsBug.ts */ class Test { static member = async (x: string) => { }; } Test.member(""); Compiled with: tsc TsBug.ts --lib es2015.promise,es5 Run with: node TsBug.js Expected be...
Open Graph Description: TypeScript Version: 2.4.0 / 2.4.1 / 2.5.0-dev.20170629 Code /* TsBug.ts */ class Test { static member = async (x: string) => { }; } Test.member(""); Compiled with: tsc TsBug.ts --lib es2015.promise...
X Description: TypeScript Version: 2.4.0 / 2.4.1 / 2.5.0-dev.20170629 Code /* TsBug.ts */ class Test { static member = async (x: string) => { }; } Test.member(""); Compiled with: tsc TsBug.ts --lib e...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/16924
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ReferenceError: _this is not defined, if an arrow function is a static member of a class.","articleBody":"**TypeScript Version:** 2.4.0 / 2.4.1 / 2.5.0-dev.20170629\r\n\r\n**Code**\r\n```ts\r\n/* TsBug.ts */\r\nclass Test {\r\n static member = async (x: string) => { };\r\n}\r\nTest.member(\"\");\r\n```\r\nCompiled with: `tsc TsBug.ts --lib es2015.promise,es5`\r\nRun with: `node TsBug.js` \r\n\r\n**Expected behavior:**\r\nNo output.\r\n\r\n**Actual behavior:**\r\n```\r\n/..\u003csnip>../TsBug.js:39\r\n Test.member = function (x) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\r\n ^\r\n\r\nReferenceError: _this is not defined\r\n at Function.Test.member (/..\u003csnip>../TsBug.js:39:51)\r\n```","author":{"url":"https://github.com/laszlopandy","@type":"Person","name":"laszlopandy"},"datePublished":"2017-07-04T15:05:06Z","url":"https://github.com/microsoft/TypeScript/issues/16924"}
| 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:37120c7c-91b7-9f1d-023a-0150746660a2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3F2:14EB6E:3D280D:4FFCA7:6B019464 |
| html-safe-nonce | 01eac28273867a281d0a50a19bf5b22cf90376a9f0287de77c1fe73d9d98942a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0YyOjE0RUI2RTozRDI4MEQ6NEZGQ0E3OjZCMDE5NDY0IiwidmlzaXRvcl9pZCI6IjE2MjY5MDA0MDQ4MzI5MzI5NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cb6f4c427f248dd581c02a382304051783c96769bc27d4d6a9aa7bf4607ff330 |
| hovercard-subject-tag | issue:240446040 |
| 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/16924/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6ba36b78bcbba6e0c79b9509fb35485e7cfe6e188c9e4f67f9a63c062b1090c/microsoft/TypeScript/issues/16924 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6ba36b78bcbba6e0c79b9509fb35485e7cfe6e188c9e4f67f9a63c062b1090c/microsoft/TypeScript/issues/16924 |
| og:image:alt | TypeScript Version: 2.4.0 / 2.4.1 / 2.5.0-dev.20170629 Code /* TsBug.ts */ class Test { static member = async (x: string) => { }; } Test.member(""); Compiled with: tsc TsBug.ts --lib es2015.promise... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | laszlopandy |
| 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