title: TypeScript type for return of Reselect Redux function?
body: <p>Is it possible to define the return type of the <code>createSelector</code> function in Redux's Reselect? </p>
  
  <p>I couldn't figure this out from the official docs: <a href="https://github.com/reduxjs/reselect#q-are-there-typescript-typings" rel="nofollow noreferrer">https://github.com/reduxjs/reselect#q-are-there-typescript-typings</a></p>
  
  <p>This cheatsheet also doesn't seem to provide this:
  <a href="https://github.com/piotrwitek/react-redux-typescript-guide#selectors-with-reselect" rel="nofollow noreferrer">https://github.com/piotrwitek/react-redux-typescript-guide#selectors-with-reselect</a></p>
  
  <pre><code>import { createSelector } from 'reselect';
  
  import { TodosState } from './reducer';
  
  export const getTodos = (state: TodosState) =&gt; state.todos;
  
  export const getTodosFilter = (state: TodosState) =&gt; state.todosFilter;
  
  export const getFilteredTodos = createSelector(getTodos, getTodosFilter, (todos, todosFilter) =&gt; {
    switch (todosFilter) {
      case 'completed':
        return todos.filter(t =&gt; t.completed);
      case 'active':
        return todos.filter(t =&gt; !t.completed);
  
      default:
        return todos;
    }
  });
  </code></pre>
  
  <p>If I know that the return from <code>getFilteredTodos</code> is something like this:</p>
  
  <pre><code>type Return = {
    text: string;
    completed: boolean;
  }[]
  </code></pre>
  
  <p>Then can I define this? </p>