SujalChoudhari/Solarstache

Fix 3 Style, 2 Maintainability issues in src\index.ts

Opened this issue · 0 comments

CodeFactor found multiple issues:

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.

Unexpected any. Specify a different type.

'fs' is defined but never used.