Skip to content

disallow $state(new SvelteSet) and similar #1052

@mustafa0x

Description

@mustafa0x

Motivation

SvelteMap, SvelteSet, and SvelteURL don't need to be wrapped in $state. but that's not always obvious

Description

per above

Examples

<!-- ✓ GOOD -->
<script>
const myset = new SvelteSet
</script>

<!-- ✗ BAD -->
<script>
const myset = $state(new SvelteSet)
</script>

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions