jf3096/json-typescript-mapper

Cannot find name 'JsonProperty'

Opened this issue · 1 comments

Haven't been able to get my project to compile. I installed the npm package as prescribed and I'm on Typescript 2.1.5. Error is "Cannot find name 'JsonProperty'.

My tsconfig file is below. Any suggestions?

{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"importHelpers": true,
"compileOnSave": true,
"module": "commonjs",
"target": "es5",
"sourceMap": true,
"outDir": "${workspaceRoot}/built/",
"sourceRoot" : "${workspaceRoot}/src",
"watch" : true,
"lib" : ["es2017", "dom"]
},
"exclude": [
"node_modules"
]
}

Code:

export class TakeTurnResponse
{
@JsonProperty('orig-text')
public originalText : String;
}

Looks like the readme is missing an import:

import {JsonProperty} from 'json-typescript-mapper'