Skip to content

Errors are not moved when using type $$Props #1523

@dummdidumm

Description

@dummdidumm

Describe the bug

This code

const is$$PropsError =
isAfterSvelte2TsxPropsReturn(
fragment.text,
fragment.offsetAt(diagnostic.range.start)
) && diagnostic.message.includes('$$Props');
is not working, in other words not moving the error, when someone uses type $$Props = .. because the word $$Props doesnt show up then.

Reproduction

<script lang="ts">
	interface ItemData {
		x: number;
		y: number;
	}

	type $$Props = ItemData;

	export let x;
	export let y:string;
</script>

Expected behaviour

Error is shown

System Info

Windows, VS Code

Which package is the issue about?

Svelte for VS Code

Additional Information, eg. Screenshots

No response

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