Closed
Description
In Vue v3.4, it is possible to write:
<script setup>
import { ref } from 'vue'
const disabled = ref(true)
</script>
<template>
<button :disabled>Log in</button>
</template>
But vue-tsc
throws with:
error TS2322: Type '{}' is not assignable to type 'Booleanish | undefined'.
26 <button :disabled>Log in</button>
~~~~~~~~~
../node_modules/.pnpm/@vue+runtime-dom@3.4.0-rc.3/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts:411:5
411 disabled?: Booleanish;
~~~~~~~~
The expected type comes from property 'disabled' which is declared here on type 'ButtonHTMLAttributes & ReservedProps'
See the repro on the playground
Metadata
Metadata
Assignees
Labels
No labels