Package Exports
- conditional-decorator
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (conditional-decorator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Conditional Decorator
A decorator which can wrap other decorator
Installation
npm install conditional-decoratorUsage
import { conditional } from 'conditional-decorator';
import { logger } from './logger';
class Foo {
@logger
bar() {
// ...
}
@conditional(__DEBUG__, logger)
baz() {
// ...
}
}API
You can read TypeDoc-generated documentation here
Using with TypeScript
TBD
Todo
- Test for:
- Object Literal Method Declaration
- Object Literal Accessor Declaration
Both are unavailable in TypeScript 1.6.2, so test should be done in Babel with es6.decorators option