A utility to fight against malicious hackers on Bedrock Edition.
GNU General Public License v3.0
35
stars
22
forks
source link
Fix 'Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape.' issue in src\commands\moderation\op.ts #55
CodeFactor found an issue: Don't use Function as a type. The Function type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with new.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape.
CodeFactor found an issue: Don't use
Function
as a type. TheFunction
type accepts any function-like value. It provides no type safety when calling the function, which can be a common source of bugs. It also accepts things like class declarations, which will throw at runtime as they will not be called withnew
. If you are expecting the function to accept certain arguments, you should explicitly define the function shape.It's currently on: src\commands\moderation\op.ts:119