svelte-material-ui icon indicating copy to clipboard operation
svelte-material-ui copied to clipboard

Textfield type error in v8-alpha

Open tomasz13nocon opened this issue 5 months ago • 0 comments

Describe the bug Binding value of Textfield on v8 alpha with svelte 5 makes Typescript complain: Type 'string | number | null' is not assignable to type 'string'.

To Reproduce

<script lang="ts">
	import Textfield from '@smui/textfield';
	let value = $state("");
</script>

<Textfield type="text" bind:value />

The only way for the error to go away is to define value as string | number | null which is undesirable.

Defining value as just string works just fine on v7 with svelte 4.

tomasz13nocon avatar Sep 23 '24 13:09 tomasz13nocon