From de621814ba84c561c3fdd4fc5cb2305c30c47c48 Mon Sep 17 00:00:00 2001 From: Tai Nguyen Date: Fri, 5 Jun 2026 11:02:40 -0700 Subject: [PATCH] refactor(tutorial): use isProductAttachment type guard instead of inline predicate --- examples/tutorial/src/5-custom-attachment-type/App.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/tutorial/src/5-custom-attachment-type/App.tsx b/examples/tutorial/src/5-custom-attachment-type/App.tsx index 794bc476c..3cd1483ee 100644 --- a/examples/tutorial/src/5-custom-attachment-type/App.tsx +++ b/examples/tutorial/src/5-custom-attachment-type/App.tsx @@ -93,9 +93,7 @@ const App = () => { await channel.watch(); const hasProductMessage = channel.state.messages.some((message) => - message.attachments?.some( - (attachment) => 'type' in attachment && attachment.type === 'product', - ), + message.attachments?.some(isProductAttachment), ); if (!hasProductMessage) {