> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-unsafe-function-type

[Added in v0.6.0](https://github.com/web-infra-dev/rslint/releases/tag/v0.6.0)
## Configuration

| Preset                              | Configured Value |
| ----------------------------------- | ---------------- |
| ✅ ts.configs.recommended            | `"error"`        |
| ✅ ts.configs.recommendedTypeChecked | `"error"`        |
| ✅ ts.configs.strict                 | `"error"`        |
| ✅ ts.configs.strictTypeChecked      | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/no-unsafe-function-type': 'error',
    },
  },
]);
```

## 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:

```typescript
let value: Function;

let values: Function[];

let valueOrNumber: Function | number;

class Weird implements Function {
  // ...
}

interface AlsoWeird extends Function {
  // ...
}
```

Examples of **correct** code for this rule:

```typescript
let value: () => void;

let value: <T>(t: T) => T;

{
  type Function = () => void;
  let value: Function;
}
```

## Original Documentation

- [typescript-eslint: no-unsafe-function-type](https://typescript-eslint.io/rules/no-unsafe-function-type)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.67.0/packages/eslint-plugin/src/rules/no-unsafe-function-type.ts)
