When I run "make" on x86-64 Linux with this code (a branch of a GitHub repository), I encounter the following errors:
shlomif@telaviv1:~/Download/unpack/to-del/TypeScript-flot$ make
tsc --outFile foo.js foo.ts
foo.ts(18,12): error TS2345: Argument of type 'string' is not assignable to parameter of type 'JQuery'.
foo.ts(47,39): error TS2345: Argument of type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to parameter of type 'boolean'.
foo.ts(68,39): error TS2345: Argument of type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to parameter of type 'boolean'.
foo.ts(71,5): error TS2304: Cannot find name 'plot'.
foo.ts(74,40): error TS2339: Property 'version' does not exist on type '{ (placeholder: JQuery, data: dataSeries[], options?: plotOptions): plot; (placeholder: JQuery, d...'.
Makefile:6: recipe for target 'foo.js' failed
make: *** [foo.js] Error 2
The relevant TypeScript code snippet is as follows:
$.plot("#placeholder", [
{ data: series[0], label: "old-time(iters)", },
{ data: series[1], label: "new-time(iters)", },
],
{
series: {
lines: {
show: true
},
points: {
show: true
}
},
grid: {
hoverable: true,
clickable: true
},
}
);
I am using the TypeScript tsc compiler along with jQuery definitions from https://github.com/DefinitelyTyped/DefinitelyTyped and a modified version of the jQuery Flot definitions to address other errors reported by the tsc compiler.
How can these errors be rectified?