I'm new to TypeScript, and would like to create a d.ts definition file for a JavaScript library, moviedb-js, which can retreive movie information from TheMovieDb. I've looked for an existing definition at the Definitely Typed repository, and read Fenton's guide on creating a definition file, among others, however, I'm stuck with translating the following JavaScript bit:
var MovieDB = require('moviedb')('your api key');
When creating a module, I have something along the lines of
declare module 'moviedb' { ... }
And in my TypeScript code, I import it with:
import moviedb = require('moviedb')
Clearly, without an API key, this doesn't work, and adding the key as in the JavaScript example didn't work either. So how can I rewrite the module definition in such a way that I can define the API key that is needed?