( pastedContents: Record<number, PastedContent> | undefined, )
| 370 | |
| 371 | /** Extract image paste IDs from a QueuedCommand's pastedContents. */ |
| 372 | export function getImagePasteIds( |
| 373 | pastedContents: Record<number, PastedContent> | undefined, |
| 374 | ): number[] | undefined { |
| 375 | if (!pastedContents) { |
| 376 | return undefined |
| 377 | } |
| 378 | const ids = Object.values(pastedContents) |
| 379 | .filter(isValidImagePaste) |
| 380 | .map(c => c.id) |
| 381 | return ids.length > 0 ? ids : undefined |
| 382 | } |
| 383 | |
| 384 | export type OrphanedPermission = { |
| 385 | permissionResult: PermissionResult |
no test coverage detected