Configure Your App for TypeScript

Filter by IDE
Select the Progress AppBuilder client you are currently using for development.

IDE

You can create and import TypeScript files, edit them and compile them to JavaScript. When you want to develop with TypeScript, you need to create your app from a TypeScript-enabled template.

Based on your settings, the in-browser client, the classic Windows desktop client, the universal desktop client and the extension for Visual Studio automatically compile valid TypeScript to JavaScript as you save your changes or before build- and simulator-related operations. The command-line interface automatically compiles valid TapeScript to JavaScript during build and build-related operations.

You need to manually reference the resulting JavaScript files in your index.html.

For NativeScript apps developed with TypeScript, when you add custom or verified npm modules using the Manage Packages wizard or the plugin commands, AppBuilder will attempt to install their TypeScript definitions, if available. This lets you use TypeScript code completion and type checking.

To develop with TypeScript in this version of the extension for Visual Studio, verify that you have installed TypeScript 1.5.2 for Visual Studio or a later stable TypeScript 1.x for Visual Studio release. To develop Angular 2 applications, verify that you are running Microsoft Visual Studio 2015 or later with TypeScript 2.0 or later installed.

Run Microsoft Visual Studio and select File → New → Project.

In the sidebar of the New Project window, select Telerik → Platform.

In the sidebar, select Cordova to list the available hybrid templates or NativeScript to list the available NativeScript templates.

From the list, choose a TypeScript-enabled template (indicated by TypeScript in brackets).

(Optional) Provide a name for your app and solution and change the location where you want to store the app.

Click OK.

If prompted, log in the Telerik Platform.

(Optional) Add new TypeScript files to your app.

In the Solution Explorer, right-click the scripts folder and select Add → New Item.

To develop with TypeScript in this version of the command-line interface, you can use your preferred code editor with TypeScript support. During build and build-related operations, the command-line interface automatically compiles your TypeScript code to JavaScript. You need to manually reference the resulting JavaScript file in your index.html.

If you want to begin your TypeScript development from an app template, perform the following steps.

Run the command-line interface.

In the command prompt, navigate to the location where you want to create the new app.

If you want to create a hybrid app, run the following command.

appbuilder create hybrid <App Name> --template "TypeScript.Blank"

If you want to create a NativeScript app, run the following command.

appbuilder create native <App Name> --template "<Template Name>"

<Template Name> is the name of a NativeScript template, enabled for TypeScript. You can set any of the following names: TypeScript.Blank, TypeScript.HelloWorld, TypeScript.NG2.Blank, TypeScript.MasterDetail, TypeScript.TabbedApp.