Convenience type to get the events the given component expects. Example:
<script lang="ts"> import type { ComponentEvents } from 'svelte'; import Component from './Component.svelte'; function handleCloseEvent(event: ComponentEvents<Component>['close']) { console.log(event.detail); }</script><Component on:close={handleCloseEvent} /> Copy
<script lang="ts"> import type { ComponentEvents } from 'svelte'; import Component from './Component.svelte'; function handleCloseEvent(event: ComponentEvents<Component>['close']) { console.log(event.detail); }</script><Component on:close={handleCloseEvent} />
Convenience type to get the events the given component expects. Example: