Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [Experiment] feat(1534): Add "sealed" key word to mark some public/protected methods not be overriden #45021

Closed
wants to merge 0 commits into from

Conversation

a-tarasyuk
Copy link
Contributor

@a-tarasyuk a-tarasyuk commented Jul 14, 2021

This is a draft/proposal PR for adding a sealed modifier to prevent property/method overriding in child classes.
Any feedback to make a clear proposal/behavior is appreciated.

  1. sealed cannot be used with private
  2. sealed cannot be used with abstract declarations
  3. sealed cannot be used with constructor declaration
  4. public/protected methods/properties marked sealed cannot be overridden in child classes
  5. TODO

Fixes #1534

@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #1534. If you can get it accepted, this PR will have a better chance of being reviewed.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jul 14, 2021
@jjangga0214
Copy link
Contributor

You can utilize a "draft PR" feature of GitHub!

@RyanCavanaugh RyanCavanaugh marked this pull request as draft July 16, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "sealed" key word to mark some public/protected methods not be overriden
4 participants