Commit 0b95202
refactor(tutorial): use isProductAttachment type guard instead of inline predicate (#3213)
## Summary
- In `5-custom-attachment-type/App.tsx`, `hasProductMessage` used an
inline predicate `(attachment) => 'type' in attachment &&
attachment.type === 'product'` that duplicated the existing
`isProductAttachment` type guard defined earlier in the same file.
- Replaced the inline predicate with a direct reference to
`isProductAttachment`.
## Test plan
- [ ] No behaviour change — purely a refactor to reuse the existing type
guard.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Documentation
* **Examples**: Updated tutorial to demonstrate improved patterns for
detecting and handling custom attachment types in message processing
workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Tai Nguyen <tainguyen@Tais-MacBook-Pro-M4.local>1 parent 2418025 commit 0b95202
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 96 | + | |
99 | 97 | | |
100 | 98 | | |
101 | 99 | | |
| |||
0 commit comments