fix(types): use @component comments for deprecation notices (#1111)

The Svelte Language Server allows component-level comments through `<!-- @component ... -->` syntax.

Deprecation notices for components should be moved from the script block to the markup template.
This commit is contained in:
metonym 2022-02-19 18:50:25 -08:00 committed by GitHub
commit df4ed9d75a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 61 additions and 40 deletions

View file

@ -1,10 +1,4 @@
<script>
/**
* @deprecated
* This component will be removed in version 1.0.0.
* Use icons from "carbon-icons-svelte" instead
*/
/**
* @extends {"./IconSkeleton.svelte"} IconSkeletonProps
* @restProps {svg}
@ -22,6 +16,11 @@
import IconSkeleton from "./IconSkeleton.svelte";
</script>
<!-- @component
@deprecated This component is deprecated.
Use icons from "carbon-icons-svelte" instead.
-->
{#if skeleton}
<IconSkeleton
{...$$restProps}

View file

@ -1,13 +1,12 @@
<script>
/**
* @deprecated
* This component will be removed in version 1.0.0.
*/
/** Set the size of the icon */
export let size = 16;
</script>
<!-- @component
@deprecated This component is deprecated.
-->
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<div
class:bx--icon--skeleton="{true}"