TypeScript Support

Reference TypeScript Definitions

You can find the file with TypeScript definitions for DevExtreme in your DevExtreme Complete package or on GitHub. Add this file to your project. Then, reference this file along with jQuery and Globalize TypeScript definition files in your .ts-file.

Any configuration object should have a specific type. In this example, the options object has the dxChartOptions type, which configures the dxChart widget. Available types along with their namespaces are listed below.

TypeScript is only a way to declare a widget configuration. You still need to use jQuery, Knockout or AngularJS to apply this configuration.

Access a Widget

To access a widget, you need to obtain its instance first. Note that the variable that will contain the widget instance should have a DevExpress.viz.WidgetName type. For example, see how you can obtain the instance of a dxChart widget.