-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Expose new compiler flags in the .targets file #3034
Comments
@paulvanbrenk, i do not know if any of these need to be in the UI as well. |
Updates to the new module targets tracked by #3033 |
Include emitDecoratorMetadata too (see #3061)? |
updated to include emitDecoratorMetaData. |
is there a way to know when this becomes available in the beta install for vs 2013? i'm working on some aurelia samples for the typescript samples repo 👍 |
it is going to be in the next public VS release. for now you can set these in TypeScriptAdditionalFlags: <TypeScriptAdditionalFlags> $(TypeScriptAdditionalFlags) --emitDecoratorMetaData </TypeScriptAdditionalFlags> |
@mhegazy oh that is soooooo cool !!! |
@mhegazy it works as you say, but there is a very small typo in the compiler flag: this: so the entire tag looks like this: <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>amd</TypeScriptModuleKind>
<TypeScriptAdditionalFlags> $(TypeScriptAdditionalFlags) --emitDecoratorMetadata </TypeScriptAdditionalFlags>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
<TypeScriptAdditionalFlags> $(TypeScriptAdditionalFlags) --emitDecoratorMetadata </TypeScriptAdditionalFlags>
</PropertyGroup> |
using new compiler flag microsoft/TypeScript#3034 (comment)
thanks @cmichaelgraham for the correction. |
edit: made 2 lists |
PR #3208 updates the remaining flag (--isolatedModules) |
This should be in 1.5 RTM for both VS 2013 and VS 2015 |
Hi, Expected: Actual: I can reproduce this issue with @cmichaelgraham sample project without any modifications:
Any ideas what do I have to configure to make it work on save just as it is working on manual build/rebuild? I haven't found a way through VS settings dialogs to tell VS2015 compiler to use "--emitDecoratorMetadata", but this flag is added to the Debug and Release configurations: |
I am seeing the same problem as @atsu85 where the metadata won't get created with a simple save. Any updates on that? |
Hint: Atom editor works really well, much better than i expected ;) |
Reopening this for investigation. @paulvanbrenk , can you verify if the compiler options in question are being honored when using compile-on-save? Thanks. |
This happens because, in the project @atsu85 refers to, the compiler flags for the metadata are specified as part of the <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
<TypeScriptEmitDecoratorMetadata>true</TypeScriptEmitDecoratorMetadata> Compile on save will work as expected. @rsnider19 The same should apply to your project, if it doesn't can you share your project file? |
Thanks @paulvanbrenk that works perfectly. Now I don't have to rebuild every time I make a change which means that I can just leave the project debugging and open in my browser. |
for future searches, MSBuild properties mapping to compiler flags are documented in https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects |
We have added a set of new flags over the course of this release, we need to add MSBuild properties for them in VS 2013 and VS 2015 in .target files as well as in the project properties.
VS 2013
VS 2015
The text was updated successfully, but these errors were encountered: