no-unsafe-function-type
Configuration
rslint.config.ts
Rule Details
Disallow using the built-in Function type. Function describes any callable value: it accepts any number of arguments, returns any, and includes class declarations, which throw at runtime when invoked without new. A concrete signature — including parameters and return type — should be used instead.
A local declaration named Function (a type alias, interface, or class) shadows the global one, in which case the reference is no longer the unsafe built-in and is not reported.
Examples of incorrect code for this rule:
Examples of correct code for this rule: