Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Textfield type error in v8-alpha #666

Open
tomasz13nocon opened this issue Sep 23, 2024 · 0 comments
Open

Textfield type error in v8-alpha #666

tomasz13nocon opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tomasz13nocon
Copy link

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 tomasz13nocon added the bug Something isn't working label Sep 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant