title: Use mapState with typescript
body: <p>I am using typescript in Vue 2 project, and now I need use Vuex for first time with typescript. I wrote this based on answers which I found on SOF or blogs, but it gives me error and I have no idea how to fix it.</p>
  <p>This is my code:</p>
  <pre><code>@Component({
    computed: {
      ...mapState('auth', {
        isUserAuthenticated: (state: AuthState) =&gt; state.auth.isUserAuthenticated
      })
    }
  })
  export default class App extends Vue {
    isUserAuthenticated!: boolean;
    drawer?: boolean = undefined;
    navItems: Array&lt;object&gt; = [
      { title: 'Home', icon: 'mdi-home' },
    ];
  }
  </code></pre>
  <p>and this is received error:</p>
  <pre><code>41:8 No overload matches this call.
    Overload 1 of 6, '(namespace: string, map: string[]): { [x: string]: Computed; }', gave the following error.
      Argument of type '{ isUserAuthenticated: (state: AuthState) =&gt; any; }' is not assignable to parameter of type 'string[]'.
        Object literal may only specify known properties, and 'isUserAuthenticated' does not exist in type 'string[]'.
    Overload 2 of 6, '(namespace: string, map: Record&lt;string, string&gt;): { [x: string]: Computed; }', gave the following error.
      Type '(state: AuthState) =&gt; any' is not assignable to type 'string'.
    Overload 3 of 6, '(namespace: string, map: Record&lt;string, (this: CustomVue, state: unknown, getters: any) =&gt; any&gt;): { [x: string]: () =&gt; any; }', gave the following error.
      Type '(state: AuthState) =&gt; any' is not assignable to type '(this: CustomVue, state: unknown, getters: any) =&gt; any'.
        Types of parameters 'state' and 'state' are incompatible.
          Type 'unknown' is not assignable to type 'AuthState'.
      39 | @Component({
      40 |   computed: {
    &gt; 41 |     ...mapState('auth', {
         |        ^
      42 |       isUserAuthenticated: (state: AuthState) =&gt; state.auth.isUserAuthenticated
      43 |     })
      44 |   }
  </code></pre>
  <p><code>auth</code> is my vuex module defined like this (I'll add actions and mutations later, now I'm trying to read state), this is <code>modules/auth/store/index.ts</code>:</p>
  <pre><code>import state from './state';
  
  export default new Vuex.Store({
    state
  });
  </code></pre>
  <p>and <code>state.ts</code> file:</p>
  <pre><code>export interface AuthState {
    isUserAuthenticated: boolean;
  }
  
  export const state: AuthState = {
    isUserAuthenticated: true
  };
  
  export default state;
  </code></pre>
  <p>and this is root file which will be register all modules in <code>/store/index.ts</code></p>
  <pre><code>import auth from '@/modules/auth/store';
  
  Vue.use(Vuex);
  
  export default new Vuex.Store({
    modules: { auth }
  });
  </code></pre>