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
#56
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 with
new
.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:77
The text was updated successfully, but these errors were encountered: