Marcus
Marcus

Reputation: 51

ESLint always complains of "Missing return type on function"

complaint

ESLint complains of "Missing return type on function" even though a return type is defined as far as I can tell.

What could cause this? Am I missing something or is ESLint missing something?

If I return something that doesn't fit the specified return type it complains both that the returned value is not assignable to type string AND that there is no return type:

enter image description here

But I guess only the first is coming from ESLint so that explains the contradiction there.

Anyway any help would be appreciated.

Upvotes: 0

Views: 284

Answers (1)

Marcus
Marcus

Reputation: 51

It turns out this was a problem between VS Code and ESLint, reloading the window fixed it (ctrl+shift+p > Developer: reload window)

Upvotes: 1

Related Questions