How could I declare a third party module which looks like this:
in third party module:
module.exports = function foo(){ // do somthing }
You declare that function:
Declare var foo: any;
This will tell Typescript that somewhere you have a function called foo which you will make sure of get injected on the site.