[Vuejs]-TypeScript can't find imports inside Vue class component when trying to reify $refs even though they can be accessed when adding them as components?

0👍

Probably because QLayout is an object and not a type.

In your code, the instance variable $refs is declared but not initialized. The syntax with : is for declaring a type.

export default class Home extends Vue {
  $refs: {
    layout: QLayout // Cannot find name 'QLayout'
  };
  // ...
}

Maybe you would like to initialize it?

export default class Home extends Vue {
  $refs = {
    layout: QLayout // Affect the variable 'QLayout' to the key 'layout'
  };
  // ...
}

Leave a comment