Suppose I have the following Svelte 5 component:
<script lang="ts"> const props: { name: string; age?: number; } = $props();</script><div>Name: {props.name}</div><div>Age: {props.age}</div>
I want props.age
to have the default value of 40
.
How can I do that, while keeping the props.
prefix to access the values?