chore(mobile): state why the notification stream frame cast is safe

This commit is contained in:
Brennan Benson
2026-09-25 19:54:18 -07:00
parent af7c29cc33
commit a547d8903b
@@ -15,6 +15,7 @@ export function subscribeToDesktopNotifications(client: RpcClient, hostId: strin
const params = { includeDesktopSuppressed: true }
// The transport releases the host registration with the id from the current `ready`.
const unsubscribeStream = client.subscribe('notifications.subscribe', params, (data: unknown) => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: this stream emits only typed objects: `ready`, `end`, and the host's notification and dismiss events.
const event = data as DismissNotificationEvent | { type: string }
// No dispose-before-ready arm: every transport detaches this listener inside
// `unsubscribeStream()`, so a callback that runs at all runs before disposal.