docs

TypeScript FAQ

Frequently asked questions regarding TypeScript in OpenUI5.


What is TypeScript about?

TypeScript is an extension of JavaScript that enhances it with type information, enabling error detection through type checking and providing code assistance in numerous supporting code editors (such as code completion and inline documentation). It’s important to note that browsers cannot directly execute TypeScript; a transpilation step is required.


What is the overall approach for using TypeScript in OpenUI5 applications?

We publish type definition files describing all the OpenUI5 APIs and types. With the help of these definitions, the TypeScript tools can do their job and support writing OpenUI5 apps in TypeScript.


How to set up a new OpenUI5 app for TypeScript development?

For detailed information on developing applications with OpenUI5, see Developing Apps. To write OpenUI5 apps in TypeScript and take advantage of its benefits, you also need to add TypeScript and the OpenUI5 type definitions as dev dependencies. Additionally, you must set up the TypeScript transpilation step. The ui5-typescript-helloworld project can serve as copy template and provides a detailed step-by-step guide for setting up a TypeScript project.


How can I get an end-to-end hands-on impression of creating and developing a OpenUI5 app in TypeScript?

You can follow the ui5-typescript tutorial, starting from scratch using an app template, extending the resulting app, and also covering advanced topics later on, like control development and integrating third-party libraries from npm.

To start even faster, see one of the following app templates:


How to convert an existing OpenUI5 app to TypeScript?

You can follow the four steps explained in the Converting OpenUI5 Apps from JavaScript to TypeScript .


How to test in TypeScript?

You can check the testing branch of the ui5-typescript-helloworld sample app.


How to develop custom controls in TypeScript?

Check the TypeScript Guidelines.


How to profit from TypeScript even when doing plain JavaScript development?

Check the js-with-typescript-support branch of the ui5-cap-event-app sample app. It explains how to add TypeScript-based benefits to an existing JavaScript app without actually switching to TypeScript development.


What are the TypeScript projects and releases provided by the OpenUI5 development team?

We provide type definitions, samples, and various tools. provides generated type definitions for the UI5 APIs, which let TypeScript understand all the involved types, so it can do its job. These definitions are provided both for OpenUI5 in two different flavors. The two flavors are:

These are the different type definition packages:


Are the type definitions ready for productive use?

They are ready for use since version 1.116.