Consider, for the toml node module I can simply use:
// toml.d.ts declare module TOML { export function parse(value:string):any; } declare module \"toml
Basarat's answer doesn't work with typescript 2.1.5. You need to declare function and export with export =:
export =
export = MyFunction; declare function MyFunction(): string;
How to write a definition file for commonjs module that exports function