Name: override-decorator
Owner: Legitcode
Description: Simple override decorator for ES7
Created: 2015-05-25 02:31:10.0
Updated: 2017-06-26 07:53:59.0
Pushed: 2015-05-25 03:58:07.0
Size: 276
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Simple @Override
decorator for ES7.
Enable stage 0 or es7.decorators
in Babel, then mark properties that are intended to override superclass properties with @Override
.
s A {
) {
/* ... */
s B extends A {
verride
) {
/* ... */
The decorator will throw an error if the decorated property does not override a parent property.
s C extends A {
verride
) {
/* ... */
rror: b does not override a member of its superclass