8000 added notice in readme. added .d.ts as ts entry point. stated in pack… · hubcarl/json-typescript-mapper@78fbf38 · GitHub
[go: up one dir, main page]

Skip to content

Commit 78fbf38

Browse files
author
艾伦
committed
added notice in readme. added .d.ts as ts entry point. stated in package.json
1 parent a320391 commit 78fbf38

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,24 @@ Simply, just map it use following code. The mapping is based on <@JsonProperty>
118118
const person = deserialize(Person, json);
119119
```
120120
121+
## Notice
122+
Remember to add: <b>experimentalDecorators</b> and <b>emitDecoratorMetadata</b> in your tsconfig.json.
123+
This is essential to enable decorator support for your typescript program. Example shown as followings:
124+
125+
```bash
126+
{
127+
"compilerOptions": {
128+
"module": "commonjs",
129+
"target": "es5",
130+
"sourceMap": true,
131+
"experimentalDecorators": true,
132+
"emitDecoratorMetadata": true
133+
},
134+
"exclude": [
135+
"node_modules"
136+
]
137+
}
138+
```
121139
## Test Report
122140
The test case will be covered in the next push. This caused by inconsistent return type.
123141
![alt tag](/git-img/Test Results — spec_index.ts.png)

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "json-typescript-mapper",
3-
"version": "0.0.2",
3+
"version": "1.0.3",
4+
"typescript": {
5+
"definition": "index.d.ts"
6+
},
47
"dependencies": {
58
"reflect-metadata": "^0.1.3"
69
},

0 commit comments

Comments
 (0)
0