Title: Incorrect error when using prototype property from static initializer · Issue #14580 · microsoft/TypeScript · GitHub
Open Graph Title: Incorrect error when using prototype property from static initializer · Issue #14580 · microsoft/TypeScript
X Title: Incorrect error when using prototype property from static initializer · Issue #14580 · microsoft/TypeScript
Description: Reduced repro from #12609 (comment) class Foo { static x = { j: Foo.prototype.bar }; // Error here, should be OK bar() { } } The static initializers execute after the class prototype is set up, so this should be OK
Open Graph Description: Reduced repro from #12609 (comment) class Foo { static x = { j: Foo.prototype.bar }; // Error here, should be OK bar() { } } The static initializers execute after the class prototype is set up, so ...
X Description: Reduced repro from #12609 (comment) class Foo { static x = { j: Foo.prototype.bar }; // Error here, should be OK bar() { } } The static initializers execute after the class prototype is set up, so ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/14580
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect error when using prototype property from static initializer","articleBody":"Reduced repro from https://github.com/Microsoft/TypeScript/issues/12609#issuecomment-285727393\r\n```ts\r\nclass Foo {\r\n static x = { j: Foo.prototype.bar }; // Error here, should be OK\r\n bar() { }\r\n}\r\n```\r\nThe static initializers execute after the class prototype is set up, so this should be OK","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2017-03-10T17:25:17Z","url":"https://github.com/microsoft/TypeScript/issues/14580"}
| 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:2b4a1e2d-8b2f-71a5-fe9d-b334c4c5b291 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD7E:1087D4:4ECAD5:6B480D:6B00CFC0 |
| html-safe-nonce | e2a0b4343bf9c9e36034157dcef352d5863523bf433944d873ed2f91858785d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDdFOjEwODdENDo0RUNBRDU6NkI0ODBEOjZCMDBDRkMwIiwidmlzaXRvcl9pZCI6IjY3NTYwNjU5MDkwODMyMTcyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6cc48d4f9149e87d66cf1a4d3218beffad00914a9c2bbd008a70d4c94ddd181 |
| hovercard-subject-tag | issue:213402112 |
| 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/14580/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0f6ecbb813fb600169fbb021e16eb717ae177b022786abfa7322bad832235f21/microsoft/TypeScript/issues/14580 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0f6ecbb813fb600169fbb021e16eb717ae177b022786abfa7322bad832235f21/microsoft/TypeScript/issues/14580 |
| og:image:alt | Reduced repro from #12609 (comment) class Foo { static x = { j: Foo.prototype.bar }; // Error here, should be OK bar() { } } The static initializers execute after the class prototype is set up, so ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RyanCavanaugh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| 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 | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width