This is an open sourced utility provided by Microsoft. We will use it to generate our typings for any project. Shoot up a Terminal as Admin or use sudo su - and enter the following:
npm install -g dts-gen
We will use one globally available module and generate its typing. Install lusca and generate its typing using the following command:
dts-gen -m lusca
You should see output such as Wrote 83 Lines to lusca.d.ts, and when you check, you can see all method declarations there, just like an interface.