Title: Type parameters as constraints dosen't work for methods · Issue #7079 · microsoft/TypeScript · GitHub
Open Graph Title: Type parameters as constraints dosen't work for methods · Issue #7079 · microsoft/TypeScript
X Title: Type parameters as constraints dosen't work for methods · Issue #7079 · microsoft/TypeScript
Description: PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods. interface Table
Open Graph Description: PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods. interface Table X Description: PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods. interface Table<T> { // For this method `T` is apparently a brand new type parameter. inse...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/7079
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type parameters as constraints dosen't work for methods","articleBody":"PR https://github.com/Microsoft/TypeScript/pull/5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods.\n\n``` js\ninterface Table\u003cT> {\n // For this method `T` is apparently a brand new type parameter.\n insert\u003cT extends U, U>(obj: U): T;\n // insert(obj: any)\n}\n\ninterface Foo {\n a: string;\n b: string;\n}\n\nlet Foos: Table\u003cFoo>;\n\n// `foo1`'s type is inferred to be {a: 1}\nlet foo1 = Foos.insert({a: 1}) // => ;\n\n// Should produce error\nlet foo2 = Foos.insert({c: 1});\n\n```\n","author":{"url":"https://github.com/hayeah","@type":"Person","name":"hayeah"},"datePublished":"2016-02-14T17:10:01Z","url":"https://github.com/microsoft/TypeScript/issues/7079"}
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:4412c35c-32ec-1e45-9e42-ea63a6cb2e45 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 8E0E:2652DC:4A7DF3:623E5C:6B00C9C4 html-safe-nonce db922ecab50a26abbc36f7b4b43d431b744e284e96bf4e14f879a7731a81a58e visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTBFOjI2NTJEQzo0QTdERjM6NjIzRTVDOjZCMDBDOUM0IiwidmlzaXRvcl9pZCI6Ijg2MDYxMzI1MjYwODExNjU3NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac ae8992fa03d39896f2e2463079e6fe47fe716718bb066ec34bc3253341bee76a hovercard-subject-tag issue:133556809 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/7079/issue_layout twitter:image https://opengraph.githubassets.com/b9ae0c3610dc180d7c5c0087d34992b17410ea79b85bdf067002e5b64911d631/microsoft/TypeScript/issues/7079 twitter:card summary_large_image og:image https://opengraph.githubassets.com/b9ae0c3610dc180d7c5c0087d34992b17410ea79b85bdf067002e5b64911d631/microsoft/TypeScript/issues/7079 og:image:alt PR #5949 implements F-bounded polymorphism. It doesn't seem to be working correctly for methods. interface Table og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username hayeah hostname github.com expected-hostname github.com None 98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4 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 ef013399cf0a3c324bea644a685d7c1e0f06b5b7 ui-target full theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.