-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
Unless I'm mistaken, it seems that the files
and group
attributes are missing from the HTMLInputAttributes
type in svelte/packages/svelte/element.d.ts
.
The typings for the binding 'bind:group'
and 'bind:files'
are present (as seen here) but the individual properties aren't.
However, the bindings exists on the deprecated SvelteInputProps
, so maybe this is intentional somehow ?
Reproduction
Any typing of HTMLInputAttributes will raise ts or svelte/check errors, like this:
<script lang="ts">
import type { HTMLInputAttributes } from 'svelte/elements';
let { files = $bindable() } : HTMLInputAttributes
</script>
<input type="file" bind:files />
As a workaround I've been extending the types:
type HTMLInputAttributes = HTMLInputAttributes & {
files?: HTMLInputAttributes['bind:files'];
group?: HTMLInputAttributes['bind:group'];
};
Logs
No response
System Info
svelte: ^5.4.0 => 5.4.0
Severity
annoyance
fehnomenal and JezerM
Metadata
Metadata
Assignees
Labels
No labels