Typescript Proto Decorator
Installation
npm install typescript-proto-decorator
API
/** * Sets a value on the class' prototype * @param value The value to set * @param options Options to set. Defaults to configurable, enumerable and writable. */;
Usage
;
Shortcuts
- You can use
@Proto.immutable
as a shortcut for{configurable: false, enumerable: true, writable: false}
. - You can use
@Proto.hidden
as a shortcut for{configurable: true, enumerable: false, writable: true}
. - You can use
@Proto.immutableHidden
as a shortcut for{configurable: false, enumerable: false, writable: false}
.
The UMD global is ProtoDecorator
.