Type Alias ComponentProps<Component>

ComponentProps<Component>: Component extends SvelteComponent<infer Props>
    ? Props
    : never

Convenience type to get the props the given component expects. Example:

<script lang="ts">
import type { ComponentProps } from 'svelte';
import Component from './Component.svelte';

const props: ComponentProps<Component> = { foo: 'bar' }; // Errors if these aren't the correct props
</script>

Type Parameters