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,9 +1,4 @@
<script>
/**
* @deprecated
* This component will be removed in version 1.0.0.
*/
/**
* Set the type of notification
* @type {"toast" | "inline"}
@ -20,6 +15,10 @@
export let caption = "Caption";
</script>
<!-- @component
@deprecated This component is deprecated.
-->
{#if notificationType === "toast"}
<div class:bx--toast-notification__details="{true}">
<h3 class:bx--toast-notification__title="{true}">{title}</h3>