JavaScript doesn’t always contain enough type information for the TypeScript compiler to infer the structures in your code – so automatically generating a definition based on JavaScript is rarely an option but:
- Microsoft/dts-gen – The official starting point Microsoft uses when creating types
- dtsmake – This one looks very promising. It depends on Ternjs which some editors use to provide autocomplete for JS code.