Legitcode/override-decorator

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

Homepage:

Size: 276

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

override-decorator

Simple @Override decorator for ES7.

Usage

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.