What are the configuration options for a TypeScript project assembly?

When I create a new project "HTMLWeb App", I get .csproj with a few default options in the project XML for Typescript. Where can I find a list of all possible TypeScript build options?

Searching for the names of the 3 options available in my project, such as "TypeScriptIncludeComments", did not return any results on Google.

+2
source share
3 answers

I found a list of options in the .targets file that comes with the TypeScript installation. The following is a complete list of options with a command line argument that actually goes to "tsc.exe" (TypeScript compiler)

  • TypeScriptIncludeComments ..... --comments
  • TypeScriptGeneratesDeclarations ..... --declaration
  • TypeScriptModuleKind ..... --module $(TypeScriptModuleKind)
  • TypeScriptIncludeDefaultLib ..... --nolib
  • TypeScriptOutFile ..... --out $(TypeScriptOutFile)
  • TypeScriptSourceMap ..... --sourcemap
  • TypeScriptTarget ..... --target $(TypeScriptTarget)
  • TypeScriptAdditionalFlags ..... $(TypeScriptAdditionalFlags)
+5
source

Update for Guptas answer for Visual Studio 2015 RC. The Microsoft.TypeScript.targets file is now located in the c: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ TypeScript directory.

  • TypeScriptRemoveComments ..... --removeComments
  • TypeScriptNoImplicitAny ..... --noImplicitAny
  • TypeScriptGeneratesDeclarations ..... --declaration
  • TypeScriptModuleKind ..... --module "$(TypeScriptModuleKind)"
  • TypeScriptOutFile ..... --out "$(TypeScriptOutFile)"
  • TypeScriptOutDir ..... --outDir "$(TypeScriptOutDir)"
  • TypeScriptSourceMap ..... --sourcemap
  • TypeScriptTarget ..... --target $(TypeScriptTarget)
  • TypeScriptNoResolve ..... --noResolve
  • TypeScriptAdditionalFlags ..... $(TypeScriptAdditionalFlags)
  • TypeScriptMapRoot ..... --mapRoot "$(TypeScriptMapRoot)"
  • TypeScriptSourceRoot ..... --sourceRoot "$(TypeScriptSourceRoot)"
  • TypeScriptCodePage ..... --codepage $(TypeScriptCodePage)
  • TypeScriptCharset ..... --charset $(TypeScriptCharset)
  • TypeScriptEmitBOM ..... --emitBOM
  • TypeScriptNoLib ..... --noLib
  • TypeScriptPreserveConstEnums ..... --preserveConstEnums
  • TypeScriptSuppressImplicitAnyIndexErrors ..... --suppressImplicitAnyIndexErrors
+4
source

The easiest way to change any Typescript build options is through web extensions . I would highly recommend it if you do any work on the Internet using Visual Studio.

0
source

Source: https://habr.com/ru/post/1234062/


All Articles