microsoft / microsoft/TypeScript
decorators in object literals not working
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
From @pascalopitz on November 19, 2015 11:43
I am getting a parsing error for decorators on object literal properties. My jsconfig.json looks like this:
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"experimentalDecorators": true
}
}
This code compiles okay in babel 5.8.12 using the "es7.decorators" extension.
Can I somehow make this work?

Copied from original issue: Microsoft/vscode#201
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the parsing error with the object-literal decorator example and the shown jsconfig.json settings, then compare the requested syntax with the compiler's existing experimental decorator support. Done means the example parses and compiles successfully with experimentalDecorators enabled, with behavior matching the intended decorator semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100