Title: Class name is missing in Function when es6 target is set · Issue #5386 · microsoft/TypeScript · GitHub
Open Graph Title: Class name is missing in Function when es6 target is set · Issue #5386 · microsoft/TypeScript
X Title: Class name is missing in Function when es6 target is set · Issue #5386 · microsoft/TypeScript
Description: I have decorator: export function Document() { return function(objectConstructor: Function) { console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my class. When targeting es6 it does not give ...
Open Graph Description: I have decorator: export function Document() { return function(objectConstructor: Function) { console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my cla...
X Description: I have decorator: export function Document() { return function(objectConstructor: Function) { console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my cla...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/5386
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Class name is missing in Function when es6 target is set","articleBody":"I have decorator:\n\n``` typescript\nexport function Document() {\n return function(objectConstructor: Function) {\n console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my class. When targeting es6 it does not give anything\n }\n}\n```\n\nHere is decorator usage:\n\n``` typescript\n@Document()\nexport class User {\n}\n```\n\nIm using \"User\" class name to create a document called \"User\", I need information how class is called. I always used es5, but now when I switched to es6 compile target I dont have information about class name anymore. Is it a bug, or it by design? If second then what is the way to get the class name?\n","author":{"url":"https://github.com/pleerock","@type":"Person","name":"pleerock"},"datePublished":"2015-10-23T22:58:58Z","url":"https://github.com/microsoft/TypeScript/issues/5386"}
| 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:b81cd343-feb2-0a9c-1379-6b537f0d6dd6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B22A:21AC3F:F273B3:135B804:6B00F80F |
| html-safe-nonce | 8b8cbbd903ad0165529ae19f26a3653b80400a75a6fcefda47ccc02cce1f91b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjJBOjIxQUMzRjpGMjczQjM6MTM1QjgwNDo2QjAwRjgwRiIsInZpc2l0b3JfaWQiOiIyODI3MTI5MDYyOTQ0NzMzMTk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ccb00438ebf967c5d0e7503a6997f2611379cb67a2ba2e03c72a6010a35566ec |
| hovercard-subject-tag | issue:113113870 |
| 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/5386/issue_layout |
| twitter:image | https://opengraph.githubassets.com/68084f8aad7f78dc34df20f6ae193c13687684653a5ff126cd95c13bae9dadc1/microsoft/TypeScript/issues/5386 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68084f8aad7f78dc34df20f6ae193c13687684653a5ff126cd95c13bae9dadc1/microsoft/TypeScript/issues/5386 |
| og:image:alt | I have decorator: export function Document() { return function(objectConstructor: Function) { console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my cla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pleerock |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width