Notes

computed沒加上type

會導致typescript認不出其他的props or data的type

Property 'selections' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<{ devices: device[]; actionDevices: actionDevice[]; }>>'

props的type assertions

import Vue, { PropType } from 'vue'

Vue.extend({
  // ...
  props: {
    propData: {
      type: Array as PropType<device[]>,
      default: () = []
    }
  }
})