This is a migrated thread and some comments may be shown as answers.

Typescript definitions missing for GridOptions.toolbar

2 Answers 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rowan
Top achievements
Rank 1
Rowan asked on 01 Mar 2015, 09:06 AM
Hello,

The Typescript definitions for GridOptions.toolbar declare it only as GridToolbarItem[]. However in Javascript that setting also supports a string or function passed in to allow custom html templates.

The Typescript toolbar definition should either be changed to 'any', or use a union type of all options (Typescript 1.4).

regards,
Rowan

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 04 Mar 2015, 08:20 AM

Hello Rowan,

Indeed, using union types is the best approach, yet we have not implemented them in our TS definitions yet. I'm afraid that using any would remove the typed benefits that are available now. You can change the definition to a union type until we start shipping the union types out of the box. Suggesting union types for implementation on UserVoice may shorten the time until they are available.

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dawid
Top achievements
Rank 1
answered on 30 Mar 2016, 05:46 AM

Hi,

The problem has been fixed few days ago:

https://github.com/DefinitelyTyped/DefinitelyTyped/commit/b14601af3fb2ad72d5048e94188a569a1838fb9c#diff-a957eca1382f9b57c1a833b4264d680c

Regards,
Dawid Pytel

Tags
General Discussions
Asked by
Rowan
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Dawid
Top achievements
Rank 1
Share this question
or