title: Nuxt + TypeScript types not working in layouts and plugins
body: <p>I'm new in TS and I want to use types in layouts too but as in the picture typescript-build returns error &quot;<code>Syntax Error: Unexpected token</code>&quot; when I add type to <code>popups</code> property.</p>
  <p>In <code>pages</code> it works correctly. It's not working in <code>layout</code> and in <code>plugins</code> ts files.</p>
  <p>Simplified not working VUE file is below.</p>
  <pre><code>&lt;template&gt;
    &lt;div id=&quot;wrapper&quot; class=&quot;d-flex no-gutters&quot;&gt;
      &lt;Nuxt/&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  &lt;script type=&quot;ts&quot;&gt;
  import {Component, Vue} from 'nuxt-property-decorator'
  
  @Component()
  export default class Default extends Vue {
    popups: {
      [key: string]: {
        show: boolean,
        loading: boolean,
        changed: boolean,
        submit_loading: boolean
      }
    } = {
      login: {
        show: false,
        loading: false,
        changed: false,
        submit_loading: false
      }
    };
  }
  &lt;/script&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/94VNP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/94VNP.png" alt="Syntax Error: Unexpected token" /></a></p>