esnext-decorators
v0.0.1
Published
A collection of ES.next decorators
Downloads
5
Readme
esnext-decorators
A collection of ES.next decorators.
Installing
esnext-decorators
is available as an
npm package.
Usage
Private Instance Members
import {encapsulated, internal} from 'esnext-decorators';
@encapsulated
class Foo {
constructor() {
this.privateVariable = 42;
this.privateReadableVariable = 'foo';
this.privateWritableVariable = 'bar';
}
get exposedReadableVariable() {
return this.privateReadableVariable;
}
get exposedWritableVariable() {
return this.privateWritableVariable;
}
set exposedWritableVariable(newValue) {
this.privateWritableVariable = newValue;
}
publicMethod() {}
@internal
privateMethod() {}
}
Development
Getting Started
The application requires the following external dependencies:
- Node.js
The rest of the dependencies are handled through:
npm install
Run tests with:
npm test