Open Satont opened 3 years ago
Thank you! Yes, we should add a script generating the typings automatically. And do you know if the current typings will be overwritten?
import logs from 'discord-logs';
logs(client); // will we get an error here, as the new typings don't include this method?
Nope, it's not overwritten.
I just extend discord.js library typings for client.on
You can switch to my branch and open test.ts
added by me.
Thats all, no other changes in typings, library.
Notice: each time you will add new events, you will need add typings in typings/index.d.ts
file.
I think I will make a script that will parse the jsdoc comments and update the typings automatically
like the ones in the scripts folder
I think I will make a script that will parse the jsdoc comments and update the typings automatically
Yea, I had this idea in my mind. It might be solution there.
I'm not sure do you need JSDoc for declare typings now, after i write types for each one event.
Maybe you will need test out https://typedoc.org/, who can generate docs from typings, but not sure it will works.
https://typedoc.org/guides/doccomments/#%40param-%3Cparam-name%3E
Says you not need declare type via JSDoc, description is enough there.