Skip to content

Object property marked as error #2709

@dm-de

Description

@dm-de

Describe the bug

like previous report here: #2556 (comment)

As you can see in the screenshot - prop is marked as an error.
I case, if you do not want to use TS and you don't disabled checkJS.
Error like this is annoying.

Reproduction

Image

<script>
	let {
		user1a = {},
		user1b = undefined,
	} = $props()
	let user2a = $state({})
	let user2b = $state(undefined)
</script>

{user1a.name}
{user1b.name}
{user2a.name}
{user2b.name}

Expected behaviour

no error

System Info

Windows
VSCode

Which package is the issue about?

No response

Additional Information, eg. Screenshots

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