I am working with Vue3 (vite) Single File Components, and here is a snippet of my code:
<button :class="{'button__active': checked === '1'}">1</button>
<button :class="{'button__active': checked === '2'}">2</button>
However, I encountered an error message in TypeScript:
Type '{ button__active: boolean; }' is not assignable to type 'string | boolean | undefined'。ts(2322)
I am unsure how to resolve this issue in TypeScript. Can TypeScript be configured to skip this check? Any suggestions would be appreciated. Thanks!