Skip to content

HTMLSpanAttributes missing from svelte/elements #16014

Closed
@wighawag

Description

@wighawag

Describe the bug

I am writing a component that extend the functionality of a <span> element and I was looking to extends the props with the types from svelte/elements but there does not seems to be a type HTMLSpanAttributes

Reproduction

pnpx sv create

create a component

<script lang="ts">
	import { type HTMLSpanAttributes } from 'svelte/elements';
	
	interface Props extends HTMLSpanAttributes {
		msg: string
	}
       let {msg. ...restProps}: Props = $props();
</script>
<span {...restProps}>
{msg}
</span>

Logs

System Info

System:
    OS: Linux 6.12 Pop!_OS 22.04 LTS
    CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics
    Memory: 11.94 GB / 30.12 GB
    Container: Yes
    Shell: 3.3.1 - /usr/bin/fish
  Binaries:
    Node: 22.15.0 - ~/.volta/tools/image/node/22.15.0/bin/node
    npm: 10.9.2 - ~/.volta/tools/image/node/22.15.0/bin/npm
    pnpm: 10.10.0 - ~/.volta/bin/pnpm
    bun: 1.2.11 - ~/.bun/bin/bun
  Browsers:
    Chrome: 136.0.7103.59

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions