Starting with Q2 2013 SP1, RadControls for Windows 8 HTML ship with TypeScript declarations (with types and documentation) for all RadControls and utility types. The declarations are built against TypeScript v0.9.0.1 and you will find them in the \js\telerik.d.ts file located in:

  • RadControls for Windows 8 HTML Q2 2013 SP installation folder;
  • The Dev, Hotfix_Dev and Source downloadable zip archives;

The Telerik namespace is exposed as an internal module of the global module and it depends on the WinJS TypeScript declarations.

The WinJS code is provided and supported by the TypeScript development team and you can find it in under \bin\winjs.d.ts in the latest branch of their repository.

In order to use RadControls’ declarations you need copies and references to both of the aforementioned files, e.g. if default.ts is the file you are working in, its location relative to the d.ts files is as shown in the image on the right, add the following two lines of code in the beginning of the file:

/// <reference path=”../typings/winjs.dt.ts” />
/// <reference path=”../typings/telerik.d.ts” />

That’s it. You now have static typing and API IntelliSense for all RadControls for Windows 8 HTML at development time
including event handler overloading on constants (the event name), detailed event argument types, etc.

The Future of telerik.d.ts

TypeScript is still in alpha stage and the TypeScript dev team is actively working on the spec and tooling. Our commitment is to support (update and fix) the RadControls declarations alongside the evolving TypeScript spec. If you find bugs in the code or have suggestions for its improvement, please let us know via our ticketing system or in the forums.

About the Author

Simeon Panayotov

is one of the tech leads in the Windows 8 HTML team at Telerik. Previously he has been a Team Lead of one of the ASP.NET AJAX teams and is now transferring knowledge and experience to the Windows 8 platform. Although his focus is on HTML and JavaScript, he doesn't limit himself to these languages and is exploring Python, C/C++, C# in his free time. He loves reading sci-fi and humorous novels and stories. He is an avid music lover.


Related Posts


Comments are disabled in preview mode.