I had this error in a typescript method:

The error

error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.

The code

getPerson(): string {



If you declare a return type, you have to return something

getName(): string {
  return 'Stef';



Saved you some valuable time?

Buy me a drink 🍺