Title: Suggestion: Generic Parameter Overloads · Issue #209 · microsoft/TypeScript · GitHub
Open Graph Title: Suggestion: Generic Parameter Overloads · Issue #209 · microsoft/TypeScript
X Title: Suggestion: Generic Parameter Overloads · Issue #209 · microsoft/TypeScript
Description: Suggestion moved over from codeplex. The suggestion is to allow generic parameter overloads like the following: declare module Backbone { class Model{} class Events{} class ViewOptions Open Graph Description: Suggestion moved over from codeplex. The suggestion is to allow generic parameter overloads like the following: declare module Backbone { class Model{} class Events{} class ViewOptions X Description: Suggestion moved over from codeplex. The suggestion is to allow generic parameter overloads like the following: declare module Backbone { class Model{} class Events{} class ViewOptions<TModel ex...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/209
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Suggestion: Generic Parameter Overloads","articleBody":"> Suggestion moved over from [codeplex](https://typescript.codeplex.com/workitem/2438/).\n\nThe suggestion is to allow generic parameter overloads like the following:\n\n``` typescript\ndeclare module Backbone {\n class Model{}\n class Events{}\n class ViewOptions\u003cTModel extends Model> {}\n class Collection\u003cTModel extends Model> {}\n\n // Generic parameter overload\n class View extends View\u003cBackbone.Model>;\n class View\u003cTModel extends Model> extends Events { // Don't take as duplicate identifier\n constructor(options?: ViewOptions\u003cTModel>);\n model: TModel;\n collection: Collection\u003cTModel>;\n }\n}\n\n// With Generics Parameter overloads, old non-generic consumer\n// code works as before and does not need to change.\nclass MyView extends Backbone.View {\n}\nvar myView = new MyView();\nvar model = myView.model; // model is of type Backbone.Model\n\n// Can gradually introduce generic parameters to Views\nclass DerivedModel extends Backbone.Model { \n}\nvar myView2 = new Backbone.View\u003cDerivedModel>();\nvar model2 = myView2.model; // model2 is of type DerivedModel\n```\n\nThis is important because this would allow people to introduce generics in their library declarations without breaking large amounts of existing code for the consumers. We do this a lot in C#, and it is compatible with TypeScript design because it won't make any changes in the resulting javascript, and works pretty much like method overloads in TypeScript.\n\nRelated discussion: https://typescript.codeplex.com/discussions/452741\n","author":{"url":"https://github.com/omidkrad","@type":"Person","name":"omidkrad"},"datePublished":"2014-07-23T01:45:52Z","url":"https://github.com/microsoft/TypeScript/issues/209"}
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:526496fb-4cd8-1cfb-ddf6-2733776f27bc current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id BBA0:3CFBC:104684B:166D6B3:6AFBFBCA html-safe-nonce e301d8c76e72fc5cdb38c835a5245770c698961838d0c47855ad3a5044257c6b visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkEwOjNDRkJDOjEwNDY4NEI6MTY2RDZCMzo2QUZCRkJDQSIsInZpc2l0b3JfaWQiOiIxNjI2MzYxNDg1MjIxMTY2MDI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac fc4d41c5f7aada60bcf9251b4cef6716b9e5e530cf982a020c103e2203bb6e81 hovercard-subject-tag issue:38478228 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/209/issue_layout twitter:image https://opengraph.githubassets.com/ec0c30e99da1c2f92bcc0ee8117b9d085ddd9823b8364001356b13308df552b1/microsoft/TypeScript/issues/209 twitter:card summary_large_image og:image https://opengraph.githubassets.com/ec0c30e99da1c2f92bcc0ee8117b9d085ddd9823b8364001356b13308df552b1/microsoft/TypeScript/issues/209 og:image:alt Suggestion moved over from codeplex. The suggestion is to allow generic parameter overloads like the following: declare module Backbone { class Model{} class Events{} class ViewOptions og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username omidkrad 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
URLs of crawlers that visited me.