Как правильно типизировать во vue computed внутри ref?

В ячейку реактивной таблицы нужно передать computed свойство.

import { computed, ComputedRef, ref } from 'vue'

interface TestButton {
  hidden: ComputedRef<boolean>
}

interface TestRow {
  buttons: TestButton[]
}

const testRows = ref<TestRow[]>([])

const _fillTable = () => {

  const row1: TestRow = {
    buttons: []
  }

  testRows.value.push(row1) // <- тут ругается
}

Ругается так:

TS2345: Argument of type 'TestRow' is not assignable to parameter of type '{ actions: { hidden: boolean; }[]; }'.
   Types of property 'actions' are incompatible.
     Type 'TestAction[]' is not assignable to type '{ hidden: boolean; }[]'.
       Type 'TestAction' is not assignable to type '{ hidden: boolean; }'.
         Types of property 'hidden' are incompatible.
           Type 'ComputedRef<boolean>' is not assignable to type 'boolean'.

Подскажите, как правильно в этом случае типизировать? Или что я делаю не так?

Если массив таблицы не рективный - все нормально


Ответы (0 шт):