Is there any way to generate Typescript definitions from a NodeJS/Javascript file ?
I have file which looks like :
module.exports = {
account_a: {
name: 'a',
title: 'Account a',
},
account_n: {
name: 'n',
title: 'Account n',
},
// and so on
};
and would like to generate some Typescript definitions of it.
Actually, I'm copy/pasting its content to a TS file and compile it using tsc --declaration .
but it's not ideal, any idea ?