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 ignored within nodejs project #5309

Closed
cveld opened this issue Oct 17, 2015 · 2 comments
Closed

experimentalDecorators ignored within nodejs project #5309

cveld opened this issue Oct 17, 2015 · 2 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@cveld
Copy link

cveld commented Oct 17, 2015

I have walked through the wizard "Create a TypeScript project from existing nodejs code" with tsconfig.json containing the line: "experimentalDecorators": true within "compilerOptions". Still I get the experimental warnings for all decorators that have been used.

I tried the same tsconfig.json configuration and code in an ASP.NET 5 project and there it just works without the warning showing up.

@cveld
Copy link
Author

cveld commented Oct 17, 2015

OK after scrolling down all the errors and warnings I now see a clear message: tsconfig.json is not supported in this project type. Is there some way around it?

@cveld cveld closed this as completed Oct 17, 2015
@cveld cveld reopened this Oct 17, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Oct 21, 2015

In VS today, if a project file exists, it take precedence on a tsconfig.json file as the main source of configuration/ build information.

This has been confusing to users trying to use tsconfig.json in existing projects. Issue #5287 is tracking making this happen.

One thing to note, any property that you define today in tsconfig.json file has a matching MSBuild property that can be defined in your .*proj file. First unload the project file, right click, and edit, then in the project file define a property (note needs to be before the import of the .targets file):

<TypeScriptEmitDecoratorMetadata>true</TypeScriptEmitDecoratorMetadata>

for the complete list of MSBuild property names see: https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects

@mhegazy mhegazy added the Question An issue which isn't directly actionable in code label Oct 21, 2015
@mhegazy mhegazy closed this as completed Oct 21, 2015
@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

2 participants