microsoft / microsoft/TypeScript
Add "sealed" key word to mark some public/protected methods not be overriden
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
From https://github.com/Microsoft/TypeScript/issues/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!
Contributor guide
Research direction
Start by reading the linked TypeScript issue #1524 and the discussion in this issue to understand the proposed meaning of a sealed method. Define the language and type-checking behavior, including how overriding should be rejected, then identify the relevant compiler tests before implementation. Done means the behavior is specified and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100