title: How to infer types for a redux-saga EventChannel with TypeScript?
body: <p>How can I infer typing for a Redux-Saga <a href="https://redux-saga.js.org/docs/advanced/Channels/" rel="nofollow noreferrer">EventChannel</a> with TypeScript?</p>
  <pre><code>const channel = eventChannel&lt;string&gt;(emit =&gt; {
      emit('example emitting strings');
      emit('even more strings');
      emit('and more!');
      return () =&gt; {
        console.log('cleanup');
      };
    });
    
    const channelResult = yield take(channel);
  </code></pre>
  <p>Give the example above, I want to infer the type of channelResult without hard coding it to string. I prefer something like using SagaReturnType:</p>
  <pre><code>const channelResult: SagaReturnType&lt;typeof channel&gt; = yield take(channel);
  </code></pre>
  <p>However that isn't working for a channel . Any help?</p>