Tomato6966 / lavalink-client

Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.
https://tomato6966.github.io/lavalink-client/
MIT License
61 stars 22 forks source link

removed unreachable code + added some docs #54

Closed appujet closed 2 months ago

Tomato6966 commented 2 months ago

You can keep the documentation, but revert the change with the switch statement

this is due to "formatting" and how the syntax of switch case is

yes, because of the early return the break isn't needed. But the break is needed to seperate the cases, else they wouldn't be seperated. therefore keep the break.

appujet commented 2 months ago

The break statements aren't necessary when using return in each case, as return exits the function.

Tomato6966 commented 2 months ago

As already stated, the break statements are there purely for syntax of switch case statements. Even tho they aren't needed, they are critical for a read able switch case statement

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

npm i https://pkg.pr.new/Tomato6966/lavalink-client@54

commit: 6a9ce06