Title: Abstract classes that implement interfaces shouldn't require method signatures · Issue #22815 · microsoft/TypeScript · GitHub
Open Graph Title: Abstract classes that implement interfaces shouldn't require method signatures · Issue #22815 · microsoft/TypeScript
X Title: Abstract classes that implement interfaces shouldn't require method signatures · Issue #22815 · microsoft/TypeScript
Description: TypeScript Version: 2.7 Search Terms: abstract class implements interface Code interface FooFace { foo(); } abstract class FooClass implements FooFace { // ^^^^^^^^ // Class 'FooClass' incorrectly implements interface 'FooFace'. // Prope...
Open Graph Description: TypeScript Version: 2.7 Search Terms: abstract class implements interface Code interface FooFace { foo(); } abstract class FooClass implements FooFace { // ^^^^^^^^ // Class 'FooClass' incorrectly ...
X Description: TypeScript Version: 2.7 Search Terms: abstract class implements interface Code interface FooFace { foo(); } abstract class FooClass implements FooFace { // ^^^^^^^^ // Class 'FooClass' inco...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22815
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Abstract classes that implement interfaces shouldn't require method signatures","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->\r\n\u003c!--\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n-->\r\n\r\n\u003c!-- If you have a QUESTION:\r\n THIS IS NOT A FORUM FOR QUESTIONS.\r\n Ask questions at http://stackoverflow.com/questions/tagged/typescript\r\n or https://gitter.im/Microsoft/TypeScript\r\n-->\r\n\r\n\u003c!-- If you have a SUGGESTION:\r\n Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.\r\n See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md\r\n-->\r\n\r\n\u003c!-- If you have a BUG:\r\n Please fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 2.7\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** abstract class implements interface\r\n\r\n**Code**\r\n\r\n```ts\r\ninterface FooFace {\r\n foo();\r\n}\r\nabstract class FooClass implements FooFace {\r\n // ^^^^^^^^\r\n // Class 'FooClass' incorrectly implements interface 'FooFace'.\r\n // Property 'foo' is missing in type 'FooClass'.\r\n //\r\n // unless the following is uncommented:\r\n //abstract foo();\r\n}\r\n\r\n// contrast:\r\nabstract class BarClass {\r\n abstract bar();\r\n}\r\nabstract class BarSubClass extends BarClass {\r\n // no `abstract bar();` required\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nAbstract classes that implement interfaces don't need to define abstract type definitions to satisfy interface.\r\n\r\n**Actual behavior:**\r\nThey do.\r\n\r\n[**Playground Link**](http://www.typescriptlang.org/play/#src=interface%20FooFace%20%7B%0D%0A%20%20%20%20foo()%3B%0D%0A%7D%0D%0Aabstract%20class%20FooClass%20implements%20FooFace%20%7B%0D%0A%20%20%20%20%2F%2F%20%20%20%20%20%20%20%20%20%5E%5E%5E%5E%5E%5E%5E%5E%0D%0A%20%20%20%20%2F%2F%20Class%20'FooClass'%20incorrectly%20implements%20interface%20'FooFace'.%0D%0A%20%20%20%20%2F%2F%20%20%20Property%20'foo'%20is%20missing%20in%20type%20'FooClass'.%0D%0A%20%20%20%20%2F%2F%0D%0A%20%20%20%20%2F%2F%20unless%20the%20following%20is%20uncommented%3A%0D%0A%20%20%20%20%2F%2Fabstract%20foo()%3B%0D%0A%7D%0D%0A%0D%0A%2F%2F%20contrast%3A%0D%0Aabstract%20class%20BarClass%20%7B%0D%0A%20%20%20%20abstract%20bar()%3B%0D%0A%7D%0D%0Aabstract%20class%20BarSubClass%20extends%20BarClass%20%7B%0D%0A%20%20%20%20%2F%2F%20no%20%60abstract%20bar()%3B%60%20required%0D%0A%7D)\r\n\r\n**Related Issues:**\r\n- #19847, where typescript fails to see that a superclass _does_ implement a method (contrast this ticket, where typescript fails to see that a class _need not_ implement a method)","author":{"url":"https://github.com/laughinghan","@type":"Person","name":"laughinghan"},"datePublished":"2018-03-23T00:42:19Z","url":"https://github.com/microsoft/TypeScript/issues/22815"}
| 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:6648c1c9-0016-0a85-0b9f-2d2daa86d580 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9874:24145A:218EDD:2E1791:6B0451E8 |
| html-safe-nonce | f0dc662ace68f04956ec589efd33a486124973022a1b354c7db85343ed7feda0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODc0OjI0MTQ1QToyMThFREQ6MkUxNzkxOjZCMDQ1MUU4IiwidmlzaXRvcl9pZCI6IjQ4MDYyMjU4ODA5OTUzNTMwNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 66781ed5d45ae7f84409028b7f8917b985de4e2bd4b44df5e16d068b67ff38bd |
| hovercard-subject-tag | issue:307862613 |
| 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/22815/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35c106ebdcb1ffe8a05ecd343e304e57c12df2843bdad914e526e4f9c7d8e56f/microsoft/TypeScript/issues/22815 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35c106ebdcb1ffe8a05ecd343e304e57c12df2843bdad914e526e4f9c7d8e56f/microsoft/TypeScript/issues/22815 |
| og:image:alt | TypeScript Version: 2.7 Search Terms: abstract class implements interface Code interface FooFace { foo(); } abstract class FooClass implements FooFace { // ^^^^^^^^ // Class 'FooClass' incorrectly ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | laughinghan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| 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 | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width