Qbs Documentation

Contents

Module typescript

The typescript module contains properties and rules for building TypeScript applications and may be used in combination with the nodejs module to run TypeScript applications directly from Qbs.

General Properties

warningLevel

Type:string
Allowed Values:"normal", "pedantic"
Default:"normal"

Severity of warnings to emit. The higher the level, the more warnings will be shown. pedantic causes the TypeScript to emit warnings on expressions and declarations with an implied 'any' type.

targetVersion

Type:string
Allowed Values:"ES3", "ES5"
Default:undefined

ECMAScript target version for generated JavaScript code. undefined uses the TypeScript compiler default, which is currently "ES3".

moduleLoader

Type:string
Allowed Values:"commonjs", "amd"
Default:undefined

If TypeScript modules are being used, the JavaScript module loading mechanism to use in the generated JavaScript code. undefined indicates modules are not being used.

stripComments

Type:bool
Default:!qbs.debugInformation

Whether to remove comments from the generated JavaScript files.

generateDeclarations

Type:bool
Default:false

Whether to generate corresponding .d.ts files during compilation; these are TypeScript's equivalent of header files.

generateSourceMaps

Type:bool
Default:qbs.debugInformation

Whether to generate corresponding .map files during compilation.

compilerFlags

Type:stringList
Default:undefined

Additional flags for the TypeScript compiler.

singleFile

Type:bool
Default:false

Whether to compile all TypeScript source files to a single JavaScript output file. The default is to compile each TypeScript file to a corresponding JavaScript file. This property is incompatible with moduleLoader.

version

Type:string
Default:undefined

The TypeScript version. Consists of four numbers separated by dots, for instance "1.0.0.0".

versionMajor

Type:int
Default:versionParts[0]

The TypeScript major version.

versionMinor

Type:int
Default:versionParts[1]

The TypeScript minor version.

versionParts

Type:list
Default:empty

The TypeScript version as a list. For instance, TypeScript version 1.0 would correspond to a value of [1, 0, 0, 0].

versionPatch

Type:int
Default:versionParts[2]

The TypeScript patch level.

versionBuild

Type:int
Default:versionParts[3]

The fourth TypeScript version number component.

toolchainInstallPath

Type:path
Default:undefined

TypeScript installation directory. This should not normally need to be changed provided that tsc is already available by searching the PATH environment variable.

compilerName

Type:string
Default:"tsc"

Name of the compiler binary. This should not normally need to be changed.

compilerPath

Type:string
Default:compilerName

Directory where the compiler binary is located. This should not normally need to be changed.