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

Add "sealed" key word to mark some public/protected methods not be overriden #1534

Open
ghost opened this issue Dec 19, 2014 · 2 comments
Open
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@ghost
Copy link

ghost commented Dec 19, 2014

From #1524, I see that the default method are all "virtual", but sometimes I don't wanna some public method to be overidden. Would you invent a mechasim to force the users that they cannot override a public method (with the key word, something like "sealed")?

Thanks!

@DanielRosenwasser DanielRosenwasser changed the title [Suggestion] Add "sealed" key word to mark some public/protected methods not be overriden Add "sealed" key word to mark some public/protected methods not be overriden Dec 19, 2014
@DanielRosenwasser DanielRosenwasser added the Suggestion An idea for TypeScript label Dec 19, 2014
@danquirk danquirk added the Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. label Jan 6, 2015
@DavidANeil
Copy link

Please add a final or sealed accessibility modifier. To be to public as private is to protected.

Overridable Non-overridable
Internal protected private
All public final

@jonlepage
Copy link

Has this fallen into oblivion?
This is an essential features for the sugars design of an public extensible API!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
4 participants