Skip to content

Commit 5e08944

Browse files
authored
Update patterns_by_usecase.md
1 parent c0e70bd commit 5e08944

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/advanced/patterns_by_usecase.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,10 @@ function isString(a: unknown): a is string {
729729

730730
[Read more about User-Defined Type Guards in the Handbook](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards).
731731

732+
### Narrowing using `extends`
733+
734+
See this quick guide: https://twitter.com/mpocock1/status/1500813765973053440?s=20&t=ImUA-NnZc4iUuPDx-XiMTA
735+
732736
## Props: One or the Other but not Both
733737

734738
Use the `in` keyword, function overloading, and union types to make components that take either one or another sets of props, but not both:

0 commit comments

Comments
 (0)