Skip to content

Commit

Permalink
docs Update 03-typescript.md (#14382)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
rob-balfre and Rich-Harris authored Nov 20, 2024
1 parent 520055c commit 97185eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/07-misc/03-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
```

Expand All @@ -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>
```

Expand Down

0 comments on commit 97185eb

Please sign in to comment.