mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 16:02:37 +00:00
chore(mobile): state why the notification stream frame cast is safe
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user