docs Update 03-typescript.md (#14382)

* Update 03-typescript.md

Fix TS error: Cannot invoke an object which is possibly 'undefined'.

* Update 03-typescript.md

---------

Co-authored-by: Rich Harris <hello@rich-harris.dev>
pull/14388/head
Rob B 1 month ago committed by GitHub
parent 520055cf5c
commit 97185eb3d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -142,7 +142,7 @@ In case you're writing a component that wraps a native element, you may want to
</script>
<button {...rest}>
{@render children()}
{@render children?.()}
</button>
```
@ -156,7 +156,7 @@ Not all elements have a dedicated type definition. For those without one, use `S
</script>
<div {...rest}>
{@render children()}
{@render children?.()}
</div>
```

Loading…
Cancel
Save