Open theetrain opened 2 months ago
Deprecating component props do not yield any apparent warnings in Svelte 4 and Svelte 5.
Example Svelte 4 code:
<script> /** * @type { boolean } * @deprecated Will be removed in next major. */ export let test = false </script>
Example Svelte 5 code:
<script> /** * @typedef {boolean} Test * @deprecated Will be removed in next major. */ /** @type {{ test: Test }} */ let { test } = $props() </script>
When deprecating a component prop:
svelte-check
No response
Svelte 5 example, props used internally are crossed out. In this image, burst is incorrectly crossed out.
burst
No deprecation warning when consuming Svelte 5 component.
Svelte 4 example, internal usage is correctly deprecated.
Consumption is documented as deprecated without being crossed out.
Probably related to https://github.com/microsoft/TypeScript/issues/45657
Description
Deprecating component props do not yield any apparent warnings in Svelte 4 and Svelte 5.
Example Svelte 4 code:
Example Svelte 5 code:
Proposed solution
When deprecating a component prop:
svelte-check
when deprecated props are used.Alternatives
No response
Additional Information, eg. Screenshots
Svelte 5 example, props used internally are crossed out. In this image,
burst
is incorrectly crossed out.No deprecation warning when consuming Svelte 5 component.
Svelte 4 example, internal usage is correctly deprecated.
Consumption is documented as deprecated without being crossed out.