# TypeScript

To define **TypeScript** as the **target language** in a template file :

```
#set( $env.language = 'TypeScript' )
```

The information below shows the behavior of the generator when TypeScript is the current target language.

For a detailed description of type conversion and literal values see the generated documentation:[](<&#xD;&#xA;https://www.telosys.org/doc/latest/languages/language-scala.html>)\
<https://www.telosys.org/doc/latest/languages/language-typescript.html>

## Types conversion&#x20;

The table below describes how **model neutral types** are automatically converted to **TypeScript types**

| Model type    | TypeScript type |   |
| ------------- | --------------- | - |
| string        | **string**      |   |
| byte          | **number**      |   |
| short         | **number**      |   |
| int           | **number**      |   |
| long          | **number**      |   |
| decimal       | **number**      |   |
| float         | **number**      |   |
| double        | **number**      |   |
| boolean       | **boolean**     |   |
| date          | **Date**        |   |
| time          | **Date**        |   |
| timetz        | **Date**        |   |
| datetime      | **Date**        |   |
| datetimetz    | **Date**        |   |
| ~~timestamp~~ | **Date**        |   |
| uuid          | **string**      |   |
| binary        | **Uint8Array**  |   |

### Annotations effects

* **@UnsignedType** : no effect
* **@ObjectType** : no effect
* **@NotNull** : no effect
* **@PrimitiveType**  : no effect

### See also

For more information about TypeScript see :

* <https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#object-types>

## Literal values

#### TRUE, FALSE, NULL

|       | TypeScript  literal |
| ----- | ------------------- |
| TRUE  | **true**            |
| FALSE | **false**           |
| NULL  | **null**            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.telosys.org/target-languages/typescript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
