Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimentalDecorators in Visual Studio #3934

Closed
jamiewinder opened this issue Jul 20, 2015 · 3 comments
Closed

experimentalDecorators in Visual Studio #3934

jamiewinder opened this issue Jul 20, 2015 · 3 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@jamiewinder
Copy link

Hi. Great to see TS 1.5 finally released! Quick question which doesn't seem to be covered by the announcement / blog posts:

I see decorators have been hidden behind a compiler flag (experimentalDecorators). How can I specify this for a Visual Studio project? Guessing the answer is a tsconfig.json file, but after dropping one into the root of my project it still doesn't appear to pick it up:

{
    "compilerOptions": {
        "target": "ES5",
        "module": "system",
        "experimentalDecorators": true
    }
}
@mhegazy
Copy link
Contributor

mhegazy commented Jul 20, 2015

If you have a project file, tsconfig will not be honored. the project file takes precedence. We are still flushing the integration story between a VS project and a tsconfig as you can specify compiler options in both.

so to disable the error message, right-click on project file, unload project, then right-click edit the project file, At the end of the file there should be a config section, add:

  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
     ....
    <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators
  </PropertyGroup>

save and reload.

You may also need TypeScriptEmitDecoratorMetadata to map --emitDecroatorMetadata

For the full list, see Setting Compiler Options in MSBuild page.

@mhegazy mhegazy added the Question An issue which isn't directly actionable in code label Jul 20, 2015
@mhegazy mhegazy closed this as completed Aug 10, 2015
@Elephant-Vessel
Copy link

Where is the above mentioned integration story tracked?

@mhegazy
Copy link
Contributor

mhegazy commented Jan 5, 2016

supporting tsconfig as the main source of configuration should be in TS1.8 and is tracked by #5287

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

3 participants