-
-
Notifications
You must be signed in to change notification settings - Fork 500
Closed
Description
The following component throws with v1.1.13:
<script setup lang="ts">
import { ref } from 'vue'
const count = ref<number | null>(null)
</script>
<template>
<input v-model="count" type="radio" v-for="i in 3" :key="i" :value="i" />
</template>with:
src/App.vue:7:10 - error TS2322: Type 'number | null' is not assignable to type 'any[] | Set<any> | Booleanish | undefined'.
Type 'null' is not assignable to type 'any[] | Set<any> | Booleanish | undefined'.
7 <input v-model="count" type="radio" v-for="i in 3" :key="i" :value="i" />
~~~~~~~
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts:646:3
646 checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support
~~~~~~~
The expected type comes from property 'checked' which is declared here on type 'ElementAttrs<InputHTMLAttributes>'
undefined is allowed, but null is no longer possible
Metadata
Metadata
Assignees
Labels
No labels