Skip to content

Commit 735a920

Browse files
committed
Add manual casting to avoid error reporting by the IDE
1 parent 93995dd commit 735a920

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/BFormCheckbox/BFormCheckbox.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface BFormCheckboxProps {
6060
| Record<string, unknown>
6161
| number
6262
value?: Array<unknown> | Set<unknown> | boolean | string | Record<string, unknown> | number
63-
modelValue?: Array<unknown> | Set<unknown> | boolean
63+
modelValue?: Array<unknown> | Set<unknown> | boolean | string | Record<string, unknown> | number
6464
}
6565
6666
const props = withDefaults(defineProps<BFormCheckboxProps>(), {
@@ -93,14 +93,14 @@ const input = ref<HTMLElement>(null as unknown as HTMLElement)
9393
const isFocused = ref<boolean>(false)
9494
9595
const localValue = computed({
96-
get: () => {
96+
get: (): unknown[] | Set<unknown> | boolean | undefined => {
9797
if (props.uncheckedValue) {
9898
if (!Array.isArray(props.modelValue)) {
9999
return props.modelValue === props.value
100100
}
101101
return props.modelValue.indexOf(props.value) > -1
102102
}
103-
return props.modelValue
103+
return props.modelValue as unknown[] | Set<unknown> | boolean | undefined
104104
},
105105
set: (newValue: any) => {
106106
let emitValue = newValue

0 commit comments

Comments
 (0)