This project is read-only.

Create Typings from JS

Topics: General
Mar 11, 2013 at 12:07 PM
Hi All,
firstly Typescript is great, really like it.
Now I am using a jquery Lib called JChartFX, its really good, but I get compile warnings due to the compiler not knowing what objects are in its library.

What is the best way around this?
Mar 11, 2013 at 3:29 PM
Edited Mar 11, 2013 at 3:31 PM
You need to declare it.

Quick and dirty:
interface JQuery {
   chart(...args: any[]):JQuery;

declare var cfx: any;
You can place that in a jQuery.ChartFX.d.ts file and import it.

obviously defining the full interface with a proper configuration interface etc. would be more desirable... check out: for tons of examples...