Title: Allow call signatures on classes · Issue #619 · microsoft/TypeScript · GitHub
Open Graph Title: Allow call signatures on classes · Issue #619 · microsoft/TypeScript
X Title: Allow call signatures on classes · Issue #619 · microsoft/TypeScript
Description: From here: https://typescript.codeplex.com/workitem/2464 I have a possible solution: Just allow this: class A { [index: number]: A; // <- since you can already do this (...args): A; // <- why not allow this also? constructor(...args) { }...
Open Graph Description: From here: https://typescript.codeplex.com/workitem/2464 I have a possible solution: Just allow this: class A { [index: number]: A; // <- since you can already do this (...args): A; // <- why not a...
X Description: From here: https://typescript.codeplex.com/workitem/2464 I have a possible solution: Just allow this: class A { [index: number]: A; // <- since you can already do this (...args): A; // <- why...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/619
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow call signatures on classes","articleBody":"From here: https://typescript.codeplex.com/workitem/2464\n\nI have a possible solution: Just allow this:\n\n``` ts\nclass A {\n [index: number]: A; // \u003c- since you can already do this\n (...args): A; // \u003c- why not allow this also?\n constructor(...args) { }\n}\n```\n\nOther suggestion by fdecampredon was:\n\n``` ts\nclass A {\n (): string {\n //do something\n return 'hello world';\n }\n constructor(): A {\n //do something else\n }\n}\n```\n\ncould be transformed into that :\n\n``` ts\nfunction A() {\n if (!(this instanceof A)) {\n //do something\n return 'hello world';\n } else {\n //do something else\n }\n}\n```\n","author":{"url":"https://github.com/rjamesnw","@type":"Person","name":"rjamesnw"},"datePublished":"2014-09-06T00:59:05Z","url":"https://github.com/microsoft/TypeScript/issues/619"}
| 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:673d6e09-9324-a7d1-92ec-513946808a99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB22:229B2E:E9CC08:1357B41:6B01001A |
| html-safe-nonce | a98ac1adc8f2402384c61d99df1dadb108505b4de8ca813bec1462d826f39267 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjIyOjIyOUIyRTpFOUNDMDg6MTM1N0I0MTo2QjAxMDAxQSIsInZpc2l0b3JfaWQiOiIzMzMyMzgyNzQwNjk4OTU1ODAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b90f576346a3632bf1a948f876743740823d596a2a85a3241cd6b552ca3907fa |
| hovercard-subject-tag | issue:42104480 |
| 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/619/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5de835b93dbb57e0655049d60054930a16a9a35fccbd07f5857f17a07b07d93/microsoft/TypeScript/issues/619 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5de835b93dbb57e0655049d60054930a16a9a35fccbd07f5857f17a07b07d93/microsoft/TypeScript/issues/619 |
| og:image:alt | From here: https://typescript.codeplex.com/workitem/2464 I have a possible solution: Just allow this: class A { [index: number]: A; // <- since you can already do this (...args): A; // <- why not a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rjamesnw |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width