Skip to content
codefactor.io / CodeFactor failed Jan 14, 2024 in 4s

1 issue found.

Annotations

Check warning on line 34 in src/packages/locale/lang/baseLang.ts

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/packages/locale/lang/baseLang.ts#L34

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. (@typescript-eslint/ban-types)