eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/no-complex-return-type

ESLint plugin / typescript/no-complex-return-type

Disallow complex function return types.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/no-complex-return-type": "error"
  }
};

Examples of incorrect code

function f() {
  return { x: 1 };
}

Examples of correct code

function f(): object {
  return { x: 1 };
}