Title: Optional abstract members · Issue #6413 · microsoft/TypeScript · GitHub
Open Graph Title: Optional abstract members · Issue #6413 · microsoft/TypeScript
X Title: Optional abstract members · Issue #6413 · microsoft/TypeScript
Description: I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today. abstract class Component { public abstract setText?(l: GetLocalization): void; public abstract bindInteractions?(): void...
Open Graph Description: I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today. abstract class Component { public abstract setText?(l: GetLocalization): void; p...
X Description: I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today. abstract class Component { public abstract setText?(l: GetLocalization): void; p...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Optional abstract members","articleBody":"I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today.\n\n``` typescript\nabstract class Component {\n public abstract setText?(l: GetLocalization): void;\n public abstract bindInteractions?(): void;\n}\n```\n\nI have some component classes and they MUST extend the base component class and optionally implement certain methods with a certain signature. Right now, I can only rely on good documentation.\n\n``` typescript\nclass Post extends Component {\n public setText(l: GetLocalization): void {\n //...\n }\n // Though I don't want to implement bindInteractions method.\n}\n```\n\nI want the power of auto-completion to also kick in.\n## Why is this useful?\n\nIt is useful for classes with life cycle methods.\n","author":{"url":"https://github.com/tinganho","@type":"Person","name":"tinganho"},"datePublished":"2016-01-09T07:38:37Z","url":"https://github.com/microsoft/TypeScript/issues/6413"}
| 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:45dc01da-6e33-54b4-ed66-7ee83a0630c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A77C:10531B:271BDEA:320A040:6B01DCF8 |
| html-safe-nonce | b25d4de8fc2e74068701b96dc23d9738a7380b632cfc89429e1bcdf8b08ba9c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzdDOjEwNTMxQjoyNzFCREVBOjMyMEEwNDA6NkIwMURDRjgiLCJ2aXNpdG9yX2lkIjoiMjY5MDc1NzEyNTM3ODAwNjI2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 53f45b91476ae08fb5704f1df40661ed05b1d09e8d1b9f68f25d0073163f5554 |
| hovercard-subject-tag | issue:125744616 |
| 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/6413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/90bb8415d2042f8e61a31a05bea680a28f748d341b347c0fbcb1de2df00915d9/microsoft/TypeScript/issues/6413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/90bb8415d2042f8e61a31a05bea680a28f748d341b347c0fbcb1de2df00915d9/microsoft/TypeScript/issues/6413 |
| og:image:alt | I want to be able to make the implementation optional for abstract member, but it seems like it is not doable today. abstract class Component { public abstract setText?(l: GetLocalization): void; p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tinganho |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width