- Qbs Manual
- Module typescript
- Qt Build Suite 1.4.3

# 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

Property | Type | Since | Default | Description
--- | --- | --- | --- | ---
warningLevel | `string` | 1.3 | `"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 | `string` | 1.3 | `undefined` | ECMAScript target version for generated JavaScript code. `undefined` uses the TypeScript compiler default.
moduleLoader | `string` | 1.3 | `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. See Compiler Options for a list of possible values.
stripComments | `bool` | 1.3 | `!qbs.debugInformation` | Whether to remove comments from the generated JavaScript files.
generateDeclarations | `bool` | 1.3 | `false` | Whether to generate corresponding .d.ts files during compilation; these are TypeScript's equivalent of header files.
generateSourceMaps | `bool` | 1.3 | `qbs.debugInformation` | Whether to generate corresponding .map files during compilation.
compilerFlags | `stringList` | 1.3 | `undefined` | Additional flags for the TypeScript compiler.
singleFile | `bool` | 1.3 | `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 | `string` | 1.3 | `undefined` | The TypeScript version. Consists of four numbers separated by dots, for instance "1.0.0.0".
versionMajor | `int` | 1.3 | `versionParts[0]` | The TypeScript major version.
versionMinor | `int` | 1.3 | `versionParts[1]` | The TypeScript minor version.
versionParts | `list` | 1.3 | `empty` | The TypeScript version as a list. For instance, TypeScript version 1.0 would correspond to a value of `[1, 0, 0, 0]`.
versionPatch | `int` | 1.3 | `versionParts[2]` | The TypeScript patch level.
versionBuild | `int` | 1.3 | `versionParts[3]` | The fourth TypeScript version number component.
toolchainInstallPath | `path` | 1.3 | `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 | `string` | 1.3 | `"tsc"` | Name of the compiler binary. This should not normally need to be changed.
compilerPath | `string` | 1.3 | `compilerName` | Directory where the compiler binary is located. This should not normally need to be changed.