ERROR in src/components/CheckBoxList.vue:40:56
TS2339: Property 'length' does not exist on type 'unknown'.
38 | setup(props, { emit }) {
39 | const state = ref([]);
ERROR in src/components/CheckBoxList.vue:40:87
TS2339: Property 'length' does not exist on type 'unknown'.
38 | setup(props, { emit }) {
39 | const state = ref([]);
ERROR in src/components/CheckBoxList.vue:40:112
TS2339: Property 'length' does not exist on type 'unknown'.
38 | setup(props, { emit }) {
39 | const state = ref([]);
Version
4.5.15
Reproduction link
github.com
Environment info
Steps to reproduce
npm i npm run serve
then the CheckBoxList component show TS2339 error in the terminal
What is expected?
https://v3.vuejs.org/guide/typescript-support.html#annotating-props
What is actually happening?
ERROR in src/components/CheckBoxList.vue:40:56 TS2339: Property 'length' does not exist on type 'unknown'. 38 | setup(props, { emit }) { 39 | const state = ref([]);
ERROR in src/components/CheckBoxList.vue:40:87 TS2339: Property 'length' does not exist on type 'unknown'. 38 | setup(props, { emit }) { 39 | const state = ref([]);
ERROR in src/components/CheckBoxList.vue:40:112 TS2339: Property 'length' does not exist on type 'unknown'. 38 | setup(props, { emit }) { 39 | const state = ref([]);
ERROR in src/components/CheckBoxList.vue:41:63 TS2339: Property 'length' does not exist on type 'unknown'. 39 | const state = ref([]); 40 | const checkAll = computed(() => props.modelValue.length > 0 && props.modelValue.length === props.options.length);
ERROR in src/components/CheckBoxList.vue:48:87 TS2339: Property 'map' does not exist on type 'unknown'. 46 | }; 47 |