- Qbs Manual
- QbsModules
- typescript
- Qbs 2.5.1

# typescript

Provides TypeScript support. More...

Since: | Qbs 1.3

- List of all members, including inherited members

## Properties

- compilerFlags : stringList
- compilerName : string
- compilerPath : string
- generateDeclarations : bool
- generateSourceMaps : bool
- moduleLoader : string
- singleFile : bool
- stripComments : bool
- targetVersion : string
- toolchainInstallPath : path
- version : string
- versionBuild : int
- versionMajor : int
- versionMinor : int
- versionParts : list
- versionPatch : int
- warningLevel : string

## Detailed Description

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

## Property Documentation

compilerFlags : stringList

A list of additional flags for the TypeScript compiler.

Default: Undefined

compilerName : string

The name of the compiler binary.

This property should not normally need to be changed.

Default: `"tsc"`

compilerPath : string

The directory where the compiler binary is located.

This property should not normally need to be changed.

Default: `compilerName`

generateDeclarations : bool

Whether to generate the corresponding `.d.ts` files during compilation. These are TypeScript's equivalent of header files.

Default: `false`

generateSourceMaps : bool

Whether to generate the corresponding `.map` files during compilation.

Default: qbs.debugInformation

moduleLoader : string

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

If left undefined, modules are not used.

See Compiler Options for a list of possible values.

Default: Undefined

singleFile : bool

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.

Default: `false`

stripComments : bool

Whether to remove comments from the generated JavaScript files.

Default: !qbs.debugInformation

targetVersion : string

The ECMAScript target version for generated JavaScript code.

If left undefined, the TypeScript compiler default is used.

Default: Undefined

toolchainInstallPath : path

The TypeScript installation directory.

This property should not normally need to be changed if `tsc` is available by searching the PATH environment variable.

Default: Undefined

version : string

The TypeScript version.

Consists of four numbers separated by dots. For example, "1.0.0.0".

Default: Undefined

versionBuild : int

The fourth TypeScript version number component.

Default: `versionParts[3]`

versionMajor : int

The TypeScript major version.

Default: `versionParts[0]`

versionMinor : int

The TypeScript minor version.

Default: `versionParts[1]`

versionParts : list

The TypeScript version as a list.

For example, TypeScript version 1.0 would correspond to a value of `[1, 0, 0, 0]`.

Default: `[]`

versionPatch : int

The TypeScript patch level.

Default: `versionParts[2]`

warningLevel : string

The 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.

Default: `"normal"`