Skip to content

Type checking doesn't handle spread objects in <slot /> #1291

@rgossiaux

Description

@rgossiaux

Describe the bug
Not sure if this is only in strict mode, but at any rate: if you do <slot {...foo} /> and try to use the slot props with let:, you get an error: Property 'XXX' does not exist on type '{}'. Here's a tiny repl showing that this is valid Svelte, that nonetheless gives a type error if you run it through the language tools: https://svelte.dev/repl/c7041a4f46cf47fa88127ac4ec46b9b3?version=3.44.3

To Reproduce
See above.

Expected behavior
See above.

Screenshots
N/A

System (please complete the following information):
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions