core-decorators
Advanced tools
Comparing version 0.0.10 to 0.0.11
{ | ||
"name": "core-decorators", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecated, etc", | ||
@@ -5,0 +5,0 @@ "main": "src/core-decorators.js", |
# core-decorators.js | ||
Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecated, etc, similar to [pre-defined Annotations in Java](https://docs.oracle.com/javase/tutorial/java/annotations/predefined.html). | ||
Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecate, etc, similar to [pre-defined Annotations in Java](https://docs.oracle.com/javase/tutorial/java/annotations/predefined.html). | ||
The idea is these decorators would be used to ensure code sanity, but would be removed in production builds via a Babel plugin. | ||
### @readonly | ||
Marks a property or method as not being writable. | ||
```js | ||
import { readonly } from 'core-decorators'; | ||
class Woman { | ||
@readonly | ||
gender = 'female'; | ||
} | ||
var lady = new Woman(); | ||
lady.gender = 'male'; | ||
// Cannot assign to read only property 'gender' of [object Object] | ||
``` | ||
### @override | ||
@@ -8,0 +25,0 @@ |
export { default as override } from './override'; | ||
export { default as deprecate } from './deprecate'; | ||
export { default as deprecated } from './deprecate'; | ||
export { default as deprecate, default as deprecated } from './deprecate'; | ||
export { default as suppressWarnings } from './suppress-warnings'; | ||
export { default as memoize } from './memoize'; | ||
export { default as readonly } from './readonly'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16328
10
326
119