If this thing is written for some reason in JavaScript, you also need to declare a module for it (otherwise it will not compile).
By convention, you place such an ad in a separate file called casper.d.ts:
declare module casper { export class SomeClassInCasper { } export function someFunctionInCasper(); }
And you should include a link to this casper.d.ts at the top of your import / module:
/// <reference path="casper.d.js" /> import casper = import("casper");
source share