'legit TS type declaration

Working on Vue-3 project with TS support. Where I have declared a variable const myVariable = ref().

In another block of function, I have declared a variable this way

const response: typeof myVariable.value = [];

My concern is that would it be valid? There are other ways though. Just a little curious about this statement.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source