iSlammedMyKindle / twitchToDiscordBot

Cross-platform messaging interface between discord and twitch chats
0 stars 2 forks source link

Typescript. #1

Closed AceLikesGhosts closed 1 year ago

AceLikesGhosts commented 1 year ago

Adds Typescript and stuff. Kinda basic, didn't bother too much with the types and stuff. Also some styling and stuff. idk

iSlammedMyKindle commented 1 year ago

You made very quick work of that!

I'm going to bed, but some housekeeping items real quick since there's like literally no standard right now XP

I'm open to talking about the usage of TS, since there are people who use it, it makes sense to have in here. As one with a natural dialect of normal JS, I need to first of all code, but secondly be able to review code

Perhaps certain files can remain JS while others can be TS, not sure though

AceLikesGhosts commented 1 year ago

I have not tried the code in a sample environment yet due to the fact that all I did was add some basic types and JSDoc which were already inferred, I'll do that today and let you know. The "-Ace" in the comments is pure habit, it 100% isn't needed and I'll get rid of it. You are currently able to use both JS and TS files if I remember correctly, if not I can change the TSConfig to enable it.

Reading TS isn't that hard, same with writing, all this commit does is simply directly type the types instead of just letting them be inferred.

iSlammedMyKindle commented 1 year ago

No problem - one of my expectations from PR's is that the code is tested from the person writing it.

When you're finished testing, just ping back here and we can discuss further. :relaxed:

You are right in that TS isn't hard to read, it's a dialect per-say that I need to grow accustom to. I'm not ready to fully commit to a 100% TS environment, so perhaps we can go in-depth later on how we should organize TS with raw JS. One thing I need to get familiar with is the debugging process, since I presume you can't just click "use javascript debug console" in VSCode out of the box. However that's just me making excuses and I should get deeper into TS in general :stuck_out_tongue_closed_eyes: