Why is this an issue?

TypeScript allows declaring the type of a function in two different ways:

The function type syntax is generally preferred for being more concise.

How to fix it

Use a function type instead of an interface or object type literal with a single call signature.

Code examples

Noncompliant code example

function apply(f: { (): string }): string {
  return f();
}

Compliant solution

function apply(f: () => string): string {
  return f();
}

Noncompliant code example

interface Foo {
  (): number;
}

Compliant solution

type Foo = () => number;

Resources

Documentation