Title: Allow type system to represent `this` in function inputs/outputs · Issue #285 · microsoft/TypeScript · GitHub
Open Graph Title: Allow type system to represent `this` in function inputs/outputs · Issue #285 · microsoft/TypeScript
X Title: Allow type system to represent `this` in function inputs/outputs · Issue #285 · microsoft/TypeScript
Description: The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case that it most dear to my heart is Knockout: ...
Open Graph Description: The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case tha...
X Description: The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case tha...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/285
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow type system to represent `this` in function inputs/outputs","articleBody":"The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case that it most dear to my heart is Knockout:\n\n```\ninterface Observable\u003cT> {\n \u003cU>( this: U, value: T ): U;\n}\n\nvar viewModel = {\n Str: ko.observable( \"abc\" ),\n Num: ko.observable( 5 )\n};\n\nviewModel.Str( \"xyz\" ).Num( 10 );\n```\n","author":{"url":"https://github.com/fsoikin","@type":"Person","name":"fsoikin"},"datePublished":"2014-07-28T23:13:19Z","url":"https://github.com/microsoft/TypeScript/issues/285"}
| 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:fb20b035-5ae7-4688-948e-218f889e7978 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD60:243829:28A3C1:37DBA0:6AFC02CF |
| html-safe-nonce | 9082b2d9a8b209d59e5a26166867ee3b2b7cdc0cae8772071c0add5721401219 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDYwOjI0MzgyOToyOEEzQzE6MzdEQkEwOjZBRkMwMkNGIiwidmlzaXRvcl9pZCI6IjUzNzk1NTUyNjcxMzE5OTg5MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 31027f18de2cb3b9ca46a789eeea4ad3b92adc6261cf2e7937f451657a5281a0 |
| hovercard-subject-tag | issue:38943189 |
| 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/285/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8ce8281d5744fb5280e10e81eb16d0d0246d84aa7e29ba70797cba865e5ad29/microsoft/TypeScript/issues/285 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8ce8281d5744fb5280e10e81eb16d0d0246d84aa7e29ba70797cba865e5ad29/microsoft/TypeScript/issues/285 |
| og:image:alt | The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case tha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fsoikin |
| hostname | github.com |
| expected-hostname | github.com |
| None | fa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f |
| 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 | b3b5633a74535d9c23385512d534c66c8fde1907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width