Title: Decorator metadata breaking change between TS 2.3.4 -> 2.4.0 · Issue #18509 · microsoft/TypeScript · GitHub
Open Graph Title: Decorator metadata breaking change between TS 2.3.4 -> 2.4.0 · Issue #18509 · microsoft/TypeScript
X Title: Decorator metadata breaking change between TS 2.3.4 -> 2.4.0 · Issue #18509 · microsoft/TypeScript
Description: I couldn't find any documentation on this breaking change between TS 2.3.4 and TS 2.4.0. I'm not sure whether this is a bug or simply an undocumented change. I suspect the latter--in which case my suggestion is to add documentation regar...
Open Graph Description: I couldn't find any documentation on this breaking change between TS 2.3.4 and TS 2.4.0. I'm not sure whether this is a bug or simply an undocumented change. I suspect the latter--in which case my ...
X Description: I couldn't find any documentation on this breaking change between TS 2.3.4 and TS 2.4.0. I'm not sure whether this is a bug or simply an undocumented change. I suspect the latter--in which ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/18509
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Decorator metadata breaking change between TS 2.3.4 -> 2.4.0","articleBody":"I couldn't find any documentation on this breaking change between TS 2.3.4 and TS 2.4.0.\r\n\r\nI'm not sure whether this is a bug or simply an undocumented change. I suspect the latter--in which case my suggestion is to add documentation regarding that change.\r\n\r\n**TypeScript Version:** >= 2.4.0\r\n\r\nRan tsc with flags --experimentalDecorators --emitDecoratorMetadata.\r\n\r\nUsing reflect-metadata v0.1.10\r\n\r\n**Code**\r\n\r\n```ts\r\nimport 'reflect-metadata'\r\n\r\nconst dec = (obj: {}, prop: string) => undefined\r\n\r\nclass Foo {\r\n @dec public foo: string | null // seems to happen with any complex type\r\n @dec public bar: string\r\n}\r\n\r\nconsole.log(Reflect.getMetadata('design:type', Foo.prototype, 'foo'))\r\nconsole.log(Reflect.getMetadata('design:type', Foo.prototype, 'bar'))\r\n```\r\n\r\n**Expected behavior:**\r\n\r\noutput in 2.3.4:\r\n\r\n```\r\n[Function: String]\r\n[Function: String]\r\n```\r\n\r\n**Actual behavior:**\r\n\r\noutput in 2.4.0:\r\n\r\n```\r\n[Function: Object]\r\n[Function: String]\r\n```","author":{"url":"https://github.com/flushentitypacket","@type":"Person","name":"flushentitypacket"},"datePublished":"2017-09-15T17:49:50Z","url":"https://github.com/microsoft/TypeScript/issues/18509"}
| 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:546b7ab4-6181-dc70-3944-b0a744349d7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF24:364B55:6A797A:8BC0B3:6B00D2A9 |
| html-safe-nonce | 177c48e4ff7e6e4487d9b538eca9c497f103ae6aa2821597644d11d94952f065 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjI0OjM2NEI1NTo2QTc5N0E6OEJDMEIzOjZCMDBEMkE5IiwidmlzaXRvcl9pZCI6Ijc3NzI1MjY4Mjc5OTgyOTY3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4a978ce3ed71e7a52d8a7d73cccca0fbc3e2f6e0548b08acdabd52130c696fd6 |
| hovercard-subject-tag | issue:258115818 |
| 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/18509/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a8b6d2806e29612a6614d03a9b115a4bcc11c300e4ce7b3061c6097d88dd054/microsoft/TypeScript/issues/18509 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a8b6d2806e29612a6614d03a9b115a4bcc11c300e4ce7b3061c6097d88dd054/microsoft/TypeScript/issues/18509 |
| og:image:alt | I couldn't find any documentation on this breaking change between TS 2.3.4 and TS 2.4.0. I'm not sure whether this is a bug or simply an undocumented change. I suspect the latter--in which case my ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flushentitypacket |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width