Skip to content

Commit

Permalink
Added comment about enabling decorators support to README.md.
Browse files Browse the repository at this point in the history
Fixes #30.
  • Loading branch information
rbuckton committed Aug 9, 2016
1 parent 5282946 commit 10e2b7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Proposal to add Decorators to ES7, along with a prototype for an ES7 Reflection

* [Detailed proposal][Metadata-Spec]

## Installation

```
npm install reflect-metadata
```

## Background

* Decorators add the ability to augment a class and its members as the class is defined, through a declarative syntax.
Expand Down Expand Up @@ -161,6 +167,10 @@ function ParamTypes(...types) {
}
```

* To enable experimental support for metadata decorators in your TypeScript project, you must add `"experimentalDecorators": true` to your tsconfig.json file.
* To enable experimental support for auto-generated type metadata in your TypeScript project, you must add `"emitDecoratorMetadata": true` to your tsconfig.json file.
* Please note that auto-generated type metadata may have issues with circular or forward references for types.

## Issues

* A poorly written mutating decorator for a class constructor could cause metadata to become lost if the prototype chain is not maintained. Though, not maintaining the prototype chain in a mutating decorator for a class constructor would have other negative side effects as well. @rbuckton
Expand Down

0 comments on commit 10e2b7f

Please sign in to comment.