'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation

3

The first snippet is the code im working with and below is the error it throws and it happens on every "yield select" portion that is in the code and im not sure what my next step is.

function* onLoadingDomainsresult() {
  const pathname = yield select(getPathname);

  interface Params {
    hastag: string;
  }

'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation.  TS7057

    113 | 
    114 | function* onLoadingDomainsresult() {
  > 115 |   const pathname = yield select(getPathname);
        |                    ^
    116 | 
    117 |   interface Params {
    118 |     hastag: string;
Share
Improve this question
2
  • 1
    What is the return value of select(getPathname)? – Ivan V. Apr 2 at 16:49
  • I don't know if it has one. I went looking for it and couldn't find anything. This code was handed down to me yesterday. I'm just trying to get it working on my machine – Noahbibb21 Apr 2 at 16:56

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue